ueberauth / guardian

Elixir Authentication
MIT License
3.44k stars 381 forks source link

Sending the token to a separate frontend application from Phoenix api-only app #348

Closed ghoshnirmalya closed 7 years ago

ghoshnirmalya commented 7 years ago

How are we supposed to send the token to the frontend application since the frontend application will have to open a new window for Google authentication to work properly. So, when we send the token to the frontend from the new window, only the token will be rendered in the window as json.

For example, in my backend application, I ping localhost:4000/api/v1/auth/google to get the token. But when I ping it from my frontend application, which is running on localhost:3000, I get something like the following:

screen shot 2017-06-27 at 02 25 22

I'm guessing this happens because I'm not requesting it from a new window! But, if I request it from a new window, how will the token be sent to the parent window?

hassox commented 7 years ago

Is this related to the token flow for google OAuth? if it is you'd be better off asking on Ueberauth google. Guardian itself doesn't deal with these issues.

That being said there is an open issue on Ueberauth google to deal with client token flows better.

ghoshnirmalya commented 7 years ago

Thanks for the quick reply. I'll take this discussion over there.