我使用next授权进行社交登录:
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/
时,我无法再登录。
我在Facebook应用程序上添加了http://localhost:3000/account/aanmelden
和http://localhost:3000/account/aanmelden/
到我的有效OAuth重定向uri选项。
有人知道这种情况吗?
用于交换从登录对话框返回的代码以获得访问令牌的API调用需要再次传递与登录对话框调用中使用的完全相同的redirect_uri
值-这是一种安全措施。
除非您的系统能够动态地处理这个问题,并将该参数值与登录对话框调用中实际使用的值相匹配,否则您可能无法交替使用带和不带尾斜杠的两个版本。