Azure AD B2C - App Registration Redirect URI for React Native App

Malu Sivasankar 1 Reputation point
2020-11-24T02:57:10.07+00:00

Hi,
We are planning to integrate Azure AD B2C with our react native app.
App Registration -> Platform Configurations ->Add a Platform ->Mobile and Desktop applications

What should be the redirect URI?

Should I select the common url (https://<custom-domain>.b2clogin.com/oauth2/nativeclient) or add a custom url (<custom-domain>.b2clogin.com://oauth/)?

Thanks,
Malu

Microsoft Security | Microsoft Entra | Microsoft Entra External ID
Microsoft Security | Microsoft Entra | Microsoft Entra ID
{count} votes

1 answer

Sort by: Most helpful
  1. soumi-MSFT 11,846 Reputation points Microsoft Employee Moderator
    2020-11-24T05:54:04.623+00:00

    Hello anonymous user, thank you for reaching out. The Redirect URI is the location where AAD B2C is expected to post the token back once the authentication/authorization is done by AAD B2C and from this location, the app is expected to fetch the token and validate it or use it for its next steps.

    Among the two Redirect URIs that you mentioned above, ideally, you can choose and use any one of them, but you need to make sure that the redirect URI is consistent in both places i.e in your code as well as in the app registration in AAD B2C.

    Hope this helps.

    Do let us know if this helps and if there are any more queries around this, please do let us know so that we can help you further. Also, please do not forget to accept the response as an Answer; if the above response helped in answering your query.

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.