yapi-plugin-google
v1.0.3
Published
google login for yapi
Downloads
11
Readme
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登录按钮显示文字clientIdgoogle credentials clientIdsecretgoogle credentials secretredirectUri回调地址allowedDomains(optional) email domain allowed to login, such as: ["domainA.com", "domainB.com"]
step 2
在 Google Cloud中增加redirectUri到Authorized redirect URIs
step 3
启动并测试服务
npm install yapi-plugin-google
node server/app.js