Skip to content

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