计划对接国外的平台,引流; 第三方登录
所以先看下是否有好的框架
如是:
官网:
JustAuth
需要按照官方的指导,去做相关第三方-开发者账户相关申请 (流程有点多)
starter 一键接入
<!-- https://mvnrepository.com/artifact/com.xkcoding.justauth/justauth-spring-boot-starter -->
<dependency>
<groupId>com.xkcoding.justauth</groupId>
<artifactId>justauth-spring-boot-starter</artifactId>
<version>1.4.0</version>
</dependency>
# 第三方登录: 注意使用密文
justauth:
enabled: true
type:
FACEBOOK:
client-id: xxxxx
client-secret: xxxxxxxxxx
redirect-uri: https://192.168.5.180/api/auth/oauth/callback/facebook
extend: # 扩展配置
enum-class: com.xxxxx.ExtendSource
config:
WHATSAPP:
request-class: com.xxxx.WhatsappRequest
client-id: xxxxxx
client-secret: xxxxxxxx
redirect-uri: https://192.168.5.180/api/auth/oauth/callback/whatsapp
cache:
type: default
springboot项目及扩展-保姆级教程
https://blog.csdn.net/zhanggqianglovec/article/details/131417796
其他
参考:https://github.com/justauth/JustAuth
https://gitcode.net/justauth/JustAuth
https://github.com/justauth/justauth-spring-boot-starter
https://github.com/justauth/justauth-spring-boot-starter-demo
比如 Facebook 自己也提供的 javaScript SDK 一站式解决方案
https://developers.facebook.com/docs/facebook-login/web
参考: