Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ueberauth JSON API #31

Open
britton-jb opened this issue Feb 15, 2017 · 3 comments
Open

Ueberauth JSON API #31

britton-jb opened this issue Feb 15, 2017 · 3 comments

Comments

@britton-jb
Copy link
Owner

Currently the identity provider will work as intended on the JSON, but the Ueberauth provider flow has a few sticking points, related to this discussion.

In my testing I'm able to properly implement the OAuth flow, and redirect the user back to the single page application, the current intended use case, but then getting a guardian token down to the client securely is proving problematic. Currently it looks like the best way to handle this would either by using the session, or by appending it the URL, the latter seeming like a very bad idea, and the former seeming a bit difficult for the API user.

Currently due to constraints in Ueberauth (referenced in the above discussion) this also will not handle a mobile app authenticating using for example Google and attempting to pass the token back to the server. It looks like the better way to handle this use case may be to use another OAuth library in tandem to authenticate using a token gathered by the client OAuth flow to generate a Guardian token.

Currently open to advice and suggestions, as I feel I may be missing something obvious here.

@britton-jb britton-jb added bug and removed bug labels Feb 15, 2017
@britton-jb
Copy link
Owner Author

Based on the current constraints I'm thinking the best course of action will be to implement a SPA redirect that stores the token in the session, where the client can then retrieve it for usage.

@sgeos
Copy link

sgeos commented Oct 4, 2017

Just thinking out loud, but maybe you could offer some sort of redemption token that can be exchanged for the real token? Without properly thinking the flow through, it might be one more API call for a client without a session.

@britton-jb
Copy link
Owner Author

Yeah, that's the way the flow traditionally goes, just based on my last check (admittedly a while ago) ueberauth's sub-libraries don't support this flow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants