1
0
mirror of https://gitee.com/bookshelfplus/bookshelfplus synced 2025-09-04 08:01:39 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee

第三方登录添加GitHub

This commit is contained in:
2022-04-04 21:25:47 +08:00
parent f17a0a0a25
commit 48f01a0024
2 changed files with 7 additions and 0 deletions

View File

@@ -1,6 +1,7 @@
<button type="button" onclick="thirdPartyLogin('gitee')">Gitee</button>
<button type="button" onclick="thirdPartyLogin('OSCHINA')">OSCHINA</button>
<button type="button" onclick="thirdPartyLogin('feishu')">飞书</button>
<button type="button" onclick="thirdPartyLogin('GitHub')">GitHub(不稳定)</button>
<button type="button" onclick="thirdPartyLogin('qq')">QQ</button>
<script>
// 第三方授权登录逻辑

View File

@@ -104,6 +104,12 @@ public class ThirdPartyController extends BaseController {
.clientSecret(thirdPartyConfig.getFeishuClientsecret())
.redirectUri(thirdPartyConfig.getFeishuRedirecturi())
.build());
case "github":
return new AuthGithubRequest(AuthConfig.builder()
.clientId(thirdPartyConfig.getGithubClientid())
.clientSecret(thirdPartyConfig.getGithubClientsecret())
.redirectUri(thirdPartyConfig.getGithubRedirecturi())
.build());
case "qq":
return new AuthGiteeRequest(AuthConfig.builder()
.clientId(thirdPartyConfig.getQqClientid())