1.0.0 • Published 3 years ago
yapi-plugin-google v1.0.0
yapi-plugin-google
第三方插件,支持使用Google Login作为YApi的第三方登录
step1
在生成的配置文件中,添加如下配置:
"plugins": [
{
"name": "google",
"options": {
"buttonText": "Sign In with Google",
"clientId": "xxx",
"secret": "xxx",
"redirectUri": "http://your-yapi-server/api/user/login_by_token"
}
}
]
这里面的配置项含义如下:
buttonText
登录按钮显示文字clientId
google credentials clientIdsecret
google credentials secretredirectUri
回调地址
step 2
在 Google Cloud中增加redirectUri
到Authorized redirect URIs
step 3
启动并测试服务
npm install
node server/app.js
1.0.0
3 years ago