callback

Configures the OAuth callback route and success handler for a session-backed flow.

The redirect URI sent to the OAuth provider is derived automatically from path. The initial OAuth redirect is triggered by visiting loginPath, not this route.

Report a problem

Parameters

path

route path that receives the provider callback with authorization code and state.

onSuccess

handler invoked after the session and principal are stored. Runs in SessionContext with principal and session available.