Azure AD B2C+Nuxt: What is redirect URI?

Viewed 341

I'm planning to use Azure AD B2C in my Nuxt app.

I'm following this tutorial to register that app: https://docs.microsoft.com/en-us/azure/active-directory-b2c/tutorial-register-applications?tabs=app-reg-ga

I don't understand the explanation of redirect URI:

Under Redirect URI, select Web, and then enter https://jwt.ms in the URL text box. The redirect URI is the endpoint to which the user is sent by the authorization server (Azure AD B2C, in this case) after completing its interaction with the user, and to which an access token or authorization code is sent upon successful authorization. In a production application, it's typically a publicly accessible endpoint where your app is running, like https://contoso.com/auth-response. For testing purposes like this tutorial, you can set it to https://jwt.ms, a Microsoft-owned web application that displays the decoded contents of a token (the contents of the token never leave your browser). During app development, you might add the endpoint where your application listens locally, like https://localhost:5000. You can add and modify redirect URIs in your registered applications at any time.

When redirected, is the page reloaded? I want to prevent reloads and page transitions. If a user clicked a login button at https://example.com/some-page, I want the user to stay on that page, https://example.com/some-page.

In Nuxt case, what is the value of redirect URL?

1 Answers

Looking at the explanation it's looking like this will be the URL that the user will be sent on, after a successful login.
Like an Auth0 login form which will wait for your credentials and then, send you to the usual path of your app.

So, you should aim towards your Azure AD B2C dashboard and set the URL that you want everybody to be redirected to, upon their login is done.
There is nothing specific to Nuxt here, because the redirection will be pretty much given/done by the service.

Related