Skip to main content

InteractionRedirectDTO

Package: @nauth-toolkit/oidc-provider Type: DTO (Response)

Where to send the browser after a decision.

import type { InteractionRedirectDTO } from '@nauth-toolkit/oidc-provider';

Properties​

PropertyTypeDescription
redirectTostringAbsolute URL to navigate to
Why JSON and not a 302

Returning the URL rather than redirecting lets a single-page app drive the whole flow with fetch. Navigate with window.location.assign(redirectTo) — never a router navigation, because the browser is leaving your app: the provider resumes the authorization request and redirects on to the client from there.

Example​

{
"redirectTo": "https://auth.example.com/oidc/auth/kPz3Q8sLm2"
}

Used By​

The frontend SDK exposes the same shape as OIDCInteractionRedirect.

What's Next​