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

Feature Request - Support hybrid flow #68

Closed
torleifs opened this issue Feb 28, 2019 · 4 comments
Closed

Feature Request - Support hybrid flow #68

torleifs opened this issue Feb 28, 2019 · 4 comments

Comments

@torleifs
Copy link

If I understand the code correctly, simple_auth is currently hardcoded in WebAuthenticator. In my use-case, I would like to use a hybrid flow to do auth with my own Identity Server and instead pass code Id_token.

@Clancey
Copy link
Owner

Clancey commented Feb 28, 2019

Nothing is hard coded. Any part can be overridden. It does default to what is needed for most providers. However things like Facebook override things. https://github.com/Clancey/simple_auth/blob/master/simple_auth/lib/src/api/webAuthenticator.dart#L46-L71

@torleifs
Copy link
Author

torleifs commented Mar 1, 2019

I was thinking about the authCodeKey in WebAuthenticator, but you are right, it can be modified.
However, this part:
https://github.com/Clancey/simple_auth/blob/master/simple_auth/lib/src/api/webAuthenticator.dart#L27-L40
is a bit problematic because it expects the query parameters to contain a parameter named the same as the content of authCodeKey. If authCodeKey is "code id_token" , this will fail since the authorization code will be in a parameter named code also when using hybrid flow.

Additionally, the comment above this method is a bit misleading as the method looks for authorization codes, not tokens.

@Clancey
Copy link
Owner

Clancey commented Mar 3, 2019

It's not a problem. You subclass and you can modify that behavior. You can change what gets passed in and what it's looking for!

@Clancey Clancey closed this as completed Mar 3, 2019
@Clancey
Copy link
Owner

Clancey commented Mar 4, 2019

Feel free to re-open this if you still need help. Also if you just want to ask a few questions, the Gitter chat works great.

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