I have a Rails API which is stateless, with Devise gem for authentication and using Devise generated auth_token
to authorise each request. Now I want to add login via Facebook with following flow:
/auth/facebook/callbacks
).auth_token
.The problem is in step 4, how do I get the auth_token
via json after redirect. Anyway, the auth_token is generated each time user created or signed in successfully (via email & password).
Any best example for this?
Thanks
I ended up using Facebook Javascript SDK (using FB.login()
). Instead of Devise Facebook Omniauth. Then I send the response to the back end API.