Skip to content

Components OAuthCallbackHandler

Mika Berglund edited this page Dec 22, 2025 · 1 revision

OAuthCallbackHandler Component

This component is responsible for processing the authorization code returned by the IdP you have configured for your application. Normally, you don't have to care about this component if you have configured your application as described in the Getting Started section.

However, in some cases you might need to configure your custom redirect URL and create a page that corresponds to that URL. You then need to configure the RedirectUri configuration property for your application.

Create a Custom Callback Page

To create your custom callback page, create a normal page in your application. You can name the page whatever you like. Add the following code to the page.

@page "/my-oauth-callback"

<OAuthCallbackHandler>

</OAuthCallbackHandler>

That's it. Just remember to configure the the RedirectUri configuration property with the corresponding URI. Also, remember to configure the same callback URI also for your application registration in your IdP. This page shows you how you can do that in Microsoft Entra ID or Microsoft Entra External ID.

Clone this wiki locally