【发布时间】:2018-10-29 22:42:36
【问题描述】:
ng2-ui-auth 就是这么配置的
Ng2UiAuthModule.forRoot({
baseUrl:'http://localhost:8000',
loginUrl: '/api/auth/login',
providers: {
google: {
clientId: '....',
url: '/api/auth/google'
}
}
})
当向服务器发送会话数据时,这是 POST 负载
{
"authorizationData": {
//the same data sent to the auth endpoint
},
"oauthData": {
//the data received from the oauth endpoint
},
"userData": {
//additional data you've provided
}
}
然而,在 Lumen 框架中,Socialite 期望对象根中的两个字段 code 和 redirect_uri 否则会引发以下错误
{"message":"客户端错误:
POST https:\/\/accounts.google.com\/o\/oauth2\/token导致400 Bad Request响应:\n{\n \"error\" : \"invalid_request\",\n \"error_description\" : \"缺少必需参数:code\"\n}\n","code":400,"status_code":500}
我在文档中找不到任何内容。
我是否缺少某些配置?有人解决了这个问题吗?
提前致谢
【问题讨论】:
标签: angular lumen laravel-socialite satellizer