Google Oauth授权的重定向URI不能接受/* URL的末尾 [英] Google Oauth authorised redirect URI cant accept /* at last of URL

查看:174
本文介绍了Google Oauth授权的重定向URI不能接受/* URL的末尾的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在做stephen grider课程,他创建了一个带有授权js起始地址为 http://localhost:5000的google oauth客户端ID. 和授权的重定向URI为 http://localhost:5000/ *,Google会接受它.但是,当我尝试同样的操作时,它会向我抛出重定向URI错误,原因是无效的重定向:不能包含通配符(*).我不确定如果没有这个,还会导致问题.解决这个问题的任何方法.我输入了 http://localhost:5000/ 作为临时解决方案.请提出.

解决方案

您所遵循的课程必须非常老,我已经与Google合作五年了,当时不允许使用通配符重定向uri.

授权的重定向URI 用于来自Web服务器的请求.这是用户通过Google身份验证后将重定向到您的应用程序中的路径.该路径将附加授权码以进行访问.必须有一个协议.不能包含URL片段或相对路径.不能是公共IP地址.

重定向uri必须是您要用于处理授权的文件的路径.

ive been doing a stephen grider course and he creates a google oauth client id with authorised js orgins as http://localhost:5000 and authorised redirect URI as http://localhost:5000/* and google accepts it. But when i try the same it throws me an error for redirect URI as Invalid redirect: Cannot contain a wildcard (*). And im not sure without this , further it will cause problems.Any way to solve this. Ive typed http://localhost:5000/ as a temp solution. Kindly suggest.

解决方案

What ever course you are following must be very old I have been developing with Google for five years a wildcard redirect uri has not been allowed in that time.

Authorized redirect URIs For use with requests from a web server. This is the path in your application that users are redirected to after they have authenticated with Google. The path will be appended with the authorization code for access. Must have a protocol. Cannot contain URL fragments or relative paths. Cannot be a public IP address.

Redirect uri must be a path to the file you wish to use to handle your authorization.

这篇关于Google Oauth授权的重定向URI不能接受/* URL的末尾的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆