redirect_uri 不使用尾随反斜杠
redirect_uri not working with trailing backslash
我使用 nuxt auth 进行社交登录:
access_token_endpoint: 'https://****.**/social',
access_type: 'offline',
client_id: '688267128737845',
grant_type: 'authorization_code',
redirect_uri: 'http:localhost:3000/account/aanmelden',
response_type: 'code',
token_key: 'jwt',
userinfo_endpoint: false
使用 /account/aanmelden
代码可以工作,但是当我添加反斜杠时 /account/aanmelden/
我无法再登录了。
我已将 http://localhost:3000/account/aanmelden
和 http://localhost:3000/account/aanmelden/
添加到我在 Facebook 应用程序上的有效 OAuth 重定向 URI 选项。
有人知道会发生这种情况吗?
用于交换从登录对话框返回的代码的 API 调用,对于访问令牌,需要再次传递与登录对话框调用中使用的完全相同的 redirect_uri
值– 这是一项安全措施。
除非您的系统能够动态处理此问题,并将该参数值与登录对话框调用中实际使用的值相匹配,否则您可能无法使用这两个版本,无论是否有尾部斜杠,可互换。
我使用 nuxt auth 进行社交登录:
access_token_endpoint: 'https://****.**/social',
access_type: 'offline',
client_id: '688267128737845',
grant_type: 'authorization_code',
redirect_uri: 'http:localhost:3000/account/aanmelden',
response_type: 'code',
token_key: 'jwt',
userinfo_endpoint: false
使用 /account/aanmelden
代码可以工作,但是当我添加反斜杠时 /account/aanmelden/
我无法再登录了。
我已将 http://localhost:3000/account/aanmelden
和 http://localhost:3000/account/aanmelden/
添加到我在 Facebook 应用程序上的有效 OAuth 重定向 URI 选项。
有人知道会发生这种情况吗?
用于交换从登录对话框返回的代码的 API 调用,对于访问令牌,需要再次传递与登录对话框调用中使用的完全相同的 redirect_uri
值– 这是一项安全措施。
除非您的系统能够动态处理此问题,并将该参数值与登录对话框调用中实际使用的值相匹配,否则您可能无法使用这两个版本,无论是否有尾部斜杠,可互换。