0

I am building a ember cli app and I would like to know what is the best approach for user authentication and authorization.

I fiddled around with https://github.com/simplabs/ember-simple-auth

https://github.com/simplabs/ember-simple-auth/tree/master/packages/ember-simple-auth-torii

along with it for social auth like facebook and gmail. But what happens is client(emberjs) sends request to facebook/gmail app and gets back a token. But this token is on the client side and my server does not know about the received token. Question - How do I make the server aware of the token received on the client(ember js) ?

What should be the approach if on my ember app I want to include custom login that communicates with my node backend and gets a token and as well as I want to be able to login via facebook/gmial. ?

I am looking for a unified and seamless login solution that works well with ember cli

Ajey
  • 7,924
  • 12
  • 62
  • 86

1 Answers1

0

See this question: Workflow for Ember-simple-auth, Torii and Facebook Oauth2

You simply define a custom authenticator (you could also override the torii authenticator as opposed to the OAuth 2.0 authenticator as in the answer) that first gets the token from torii and then posts it to your own server in the authenticate method.

Community
  • 1
  • 1
marcoow
  • 4,062
  • 1
  • 14
  • 21