slim-oauth2 icon indicating copy to clipboard operation
slim-oauth2 copied to clipboard

Issue trying to link slim+oauth2+facebook login

Open tsmgeek opened this issue 6 years ago • 0 comments

I am not sure which dependency would be best to put this but it could make a good example.

I have a API which is secured using this library, all well and good if user exists in the oauth users table, issue comes when I want to auth a user via social login which will be for an app I am developing.

  1. tell user to go to FB auth
  2. user auths request and is redirected back to API (or just gets the return code)
  3. return code is supplied to API and I use Facebook SDK to confirm its all good and register user if does not already exist
  4. now problem is how do I return an access token to the client based on the user in question that has been validated via social login.

In a session based system all is good but the api should be stateless, rather relying on oauth tokens. This is something that seems to be lacking in the docs.

tsmgeek avatar Nov 08 '17 00:11 tsmgeek