- Notifications
You must be signed in to change notification settings - Fork11.7k
Laravel Passport: PKCE Flow: Authorization page does not always show up / is inconsistent#37433
-
Hello, I am trying to implement the PKCE flow and so far I have been able to get tokens. However, the way the redirection works are inconsistent: When I start the PKCE flow (from a react-native android app), the laravel server redirects me to the login page (correct so fare), however after I log in, then sometimes (I do not know what parameter influences this event) I am redirected to the default home page (and therefore I cannot complete the PKCE flow) and some other times, I am correctly redirected to the authorization page (where consent to access the protected API resource is given by the user). I don't understand why this behavior is inconsistent and how to make such that the user is always redirected to the consent page. It seems this issue is related to the fact that authenticated users are usually redirected to the home page when they log in outside of a PKCE flow Thanks in advance for the help and let me know if you need more info |
BetaWas this translation helpful?Give feedback.
All reactions
Replies: 2 comments 1 reply
-
Check the added |
BetaWas this translation helpful?Give feedback.
All reactions
-
I think I found the answer, for the inconsistent bit after spending many hours analysing what is going on. It lies in the AuthorizationController, approveRequest if condition, in particular the latter clause. |
BetaWas this translation helpful?Give feedback.
All reactions
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
This behaviour is already documented: https://laravel.com/docs/12.x/passport#requesting-tokens-redirecting-for-authorization In addition: |
BetaWas this translation helpful?Give feedback.


