Skip to content

Redirect the user to the URL they were attempting to access before registering #121

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 5, 2025

Conversation

PicassoHouessou
Copy link
Contributor

Redirect the user to the URL they were attempting to access before being intercepted by the authentication middleware.
This works if the user clicks on the “Register” page from the “Login” page.

A typical scenario:

  1. The user starts the Authorization Code Grant flow with Passport on the /oauth/authorize URL.
  2. If the user is not authenticated, they are redirected to the login page.
  3. On the login page, if the user doesn’t have an account, they can click on the register page.
  4. On the register page, after successfully creating an account, the user is redirected back to the authorize page (/oauth/authorize) to resume the OAuth authorization process.

@taylorotwell taylorotwell merged commit bbfc8f2 into laravel:main Jun 5, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants