【问题标题】:Azure AD B2C: The redirect URI in the request, does not match the ones authorized for the OAuth clientAzure AD B2C:请求中的重定向 URI 与授权给 OAuth 客户端的不匹配
【发布时间】:2021-06-29 13:44:18
【问题描述】:

我正在尝试Set up sign-up and sign-in with a Google account using Azure Active Directory B2C。在调试应用程序时,我可以使用我的电子邮件进行注册。但是我无法使用 Google 登录,我收到 The redirect URI in the request, does not match the ones authorized for the OAuth client 错误。

Appsettings.json:

"AzureADB2C": {
    "Instance": "https://InstaTranscribe.b2clogin.com/",
    "Domain": "InstaTranscribe.onmicrosoft.com",
    "ClientId": "<SomeClientId>",
    "SignUpSignInPolicyId": "B2C_1_SignUpSignInUserFlow",
    "ResetPasswordPolicyId": "B2C_1_PasswordResetUserFlow",
    "EditProfilePolicyId": "B2C_1_ProfileEditingUserFlow",
    "CallbackPath": "/signin-oidc"
  }

我错过了什么?

Authorization Error
Error 400: redirect_uri_mismatch
The redirect URI in the request, https://instatranscribe.b2clogin.com/instatranscribe.onmicrosoft.com/oauth2/authresp, does not match the ones authorized for the OAuth client. To update the authorized redirect URIs, visit: https://console.developers.google.com/apis/credentials/oauthclient/${your_client_id}?project=${your_project_number}

【问题讨论】:

    标签: azure blazor azure-ad-b2c blazor-server-side


    【解决方案1】:

    您需要将错误消息中显示的 URL 粘贴到 Google 应用设置中的“授权重定向 URI”中。一个就够了。

    【讨论】:

    • 谢谢@wojtekdo,你是对的,Google 应用设置中的“授权重定向 URI”有错字。
    猜你喜欢
    • 2019-05-09
    • 1970-01-01
    • 2016-06-29
    • 2014-04-30
    • 1970-01-01
    • 2015-08-09
    • 2021-07-09
    • 1970-01-01
    • 2020-10-15
    相关资源
    最近更新 更多