From 36ff0e9a71afcceca22aeb6d6afa851ead06fc9d Mon Sep 17 00:00:00 2001 From: songquanpeng Date: Tue, 3 Dec 2024 17:48:02 +0800 Subject: [PATCH 1/2] feat: add Feishu & Lark's OAuth Endpoints --- endpoints/endpoints.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/endpoints/endpoints.go b/endpoints/endpoints.go index 950754ce4..46e844d16 100644 --- a/endpoints/endpoints.go +++ b/endpoints/endpoints.go @@ -41,6 +41,12 @@ var Facebook = oauth2.Endpoint{ TokenURL: "https://graph.facebook.com/v3.2/oauth/access_token", } +// Feishu is the endpoint for Feishu. +var Feishu = oauth2.Endpoint{ + AuthURL: "https://open.feishu.cn/open-apis/authen/v1/authorize", + TokenURL: "https://open.feishu.cn/open-apis/authen/v2/oauth/token", +} + // Foursquare is the endpoint for Foursquare. var Foursquare = oauth2.Endpoint{ AuthURL: "https://foursquare.com/oauth2/authorize", @@ -98,6 +104,12 @@ var KaKao = oauth2.Endpoint{ TokenURL: "https://kauth.kakao.com/oauth/token", } +// Lark is the endpoint for Lark. +var Lark = oauth2.Endpoint{ + AuthURL: "https://open.larksuite.com/open-apis/authen/v1/authorize", + TokenURL: "https://open.larksuite.com/open-apis/authen/v2/oauth/token", +} + // LinkedIn is the endpoint for LinkedIn. var LinkedIn = oauth2.Endpoint{ AuthURL: "https://www.linkedin.com/oauth/v2/authorization", From 0c2e5a4bd4fced02cb09221079be05a1abbaa83c Mon Sep 17 00:00:00 2001 From: songquanpeng Date: Tue, 3 Dec 2024 18:34:34 +0800 Subject: [PATCH 2/2] fix: update auth url's domain --- endpoints/endpoints.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/endpoints/endpoints.go b/endpoints/endpoints.go index 46e844d16..e4aa370e6 100644 --- a/endpoints/endpoints.go +++ b/endpoints/endpoints.go @@ -43,7 +43,7 @@ var Facebook = oauth2.Endpoint{ // Feishu is the endpoint for Feishu. var Feishu = oauth2.Endpoint{ - AuthURL: "https://open.feishu.cn/open-apis/authen/v1/authorize", + AuthURL: "https://accounts.feishu.cn/open-apis/authen/v1/authorize", TokenURL: "https://open.feishu.cn/open-apis/authen/v2/oauth/token", } @@ -106,7 +106,7 @@ var KaKao = oauth2.Endpoint{ // Lark is the endpoint for Lark. var Lark = oauth2.Endpoint{ - AuthURL: "https://open.larksuite.com/open-apis/authen/v1/authorize", + AuthURL: "https://accounts.larksuite.com/open-apis/authen/v1/authorize", TokenURL: "https://open.larksuite.com/open-apis/authen/v2/oauth/token", }