Skip to content

How to redirect user to original URL after login callback? #747

Answered by zam6ak
zam6ak asked this question in Q&A
Discussion options

You must be logged in to vote

That's intentionally not possible on the account of most developers shooting themselves in the foot with it.

This is great default - the lib should definitely provide this level of protection by default.
But it should be extensible IMO.

If you check other OP implementations, they do point security aspects but also note that state carries other app specific data
For example:
MS Entra
https://learn.microsoft.com/en-us/entra/identity-platform/v2-protocols-oidc#send-the-sign-in-request

The state also is used to encode information about the user's state in the app before the authentication request occurred, such as the page or view the user was on.

Another example:
Auth0
https://auth0.com/…

Replies: 1 comment 8 replies

Comment options

You must be logged in to vote
8 replies
@panva
Comment options

@zam6ak
Comment options

@panva
Comment options

@zam6ak
Comment options

Answer selected by zam6ak
@dennemark
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants