Skip login page with oAuth 2 and FOSOAuthServerBundle

I have successfully installed and tested OAuth 2 workflow using Symfony 2 and FOSOAuthServerBundle.

I can request the code and get a pair of access / refresh tokens using the "login" button on the third test page that I installed and pulled the user out of my API via a custom API call. It's pretty cool here.

However, every time I test the flow from the beginning, my oAuth server continues to redirect the user to the authorization page . Here are my questions.

  • Once the user is eligible and the application, shouldn't you skip the authorization part of the process with OAuth 2.0?
  • Is this fixed on the server side or should I change the way the client site prompts for credentials?
  • And finally, can I debug and fix this?
+3


source to share


1 answer


In case anyone is struggling again, the solution is here:

https://github.com/FriendsOfSymfony/FOSOAuthServerBundle/blob/master/Resources/doc/the_oauth_event_class.md



This feature is not used by default in the FOSOAuthServer set. You need to create and EventListener

check the status of a client or user, save the user's choice and [quote: even bypass the authorization process].

+3


source







All Articles