0

我使用 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/我无法再登录。

我在 Facebook 应用程序上添加了http://localhost:3000/account/aanmelden和到我的 Valid OAuth Redirect URIs 选项。http://localhost:3000/account/aanmelden/

有谁知道会发生这种情况?

4

1 回答 1

1

将登录对话框返回的代码交换为访问令牌的 API 调用需要再次传递登录对话框调用中使用的完全相同的redirect_uri值——这是一种安全措施。

除非您的系统能够动态处理此问题,并将该参数值与登录对话框调用中实际使用的值相匹配,否则您可能无法互换使用带有和不带有斜杠的两个版本。

于 2021-02-03T07:41:01.540 回答