kan*_*lm3 5 oauth angularjs kinvey
我正在使用Kinvey在我的AngularJS应用程序上处理Oauth,它适用于Facebook,但是当我尝试使用Google登录时,我收到400错误:
错误:invalid_request
redirect_uri的参数值无效:不允许使用片段:localhost:9000 /#/ login
有没有人遇到过Google Oauth和Angular这个问题?关于如何绕过它的任何想法?该问题源于Angular路由的URL中的哈希值.
称为.# fragment identifier该错误Fragment not allowed:意味着您必须将其替换#为替代方案,例如:
然后用 Kinvey 重定向:
req.request({uri: 'http://localhost:9000/route/login',
method: 'GET'},
function(error, response, body){
response.statusCode = 302;
response.setHeader("Location", "/#/login");
response.end();
}
);
Run Code Online (Sandbox Code Playgroud)
以下是一些具有类似问题的不相关问题:
| 归档时间: |
|
| 查看次数: |
1531 次 |
| 最近记录: |