slim-oauth2
slim-oauth2 copied to clipboard
Issue trying to link slim+oauth2+facebook login
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.
- tell user to go to FB auth
- user auths request and is redirected back to API (or just gets the return code)
- return code is supplied to API and I use Facebook SDK to confirm its all good and register user if does not already exist
- 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.