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

[Question] - Authenticator for authorization code #91

Open
morrowyn opened this issue Jun 30, 2023 · 3 comments · May be fixed by #108
Open

[Question] - Authenticator for authorization code #91

morrowyn opened this issue Jun 30, 2023 · 3 comments · May be fixed by #108

Comments

@morrowyn
Copy link

Hi,

I'm trying to use your library. The example code uses an Authenticator which uses the implicit flow. However I'm trying to use the authorization code with pkce, but I can't seem to configure the Authenticator for such usage.
The documentation is also unclear on this part on how to set it up.

Regards,

@rbellens
Copy link
Contributor

have you checked out the flutter example in the example directory?

@morrowyn
Copy link
Author

Yes, I have, you initiate an openid_client and for every browser Authenticator that needs a Flow, you default to an implicit flow. See

: this._(Flow.implicit(client,

and https://github.com/appsup-dart/openid_client/blob/master/example/flutter_example/lib/openid_browser.dart

And there is no clear documentation on how to setup a browser client using authorization code with pkce. Maybe I'm missing something, but if you can point out (url or files) where I need to look to set it up, that would be helpful.

@rbellens
Copy link
Contributor

The Authenticator class is merely a wrapper around Flow that handles some common use cases, but it is not necessary to use it. It indeed does not handle pkce on browser. Implementing this should be fairly easy by creating a Flow.authorizationCodeWithPKCE and implementing your own authorize function.

Feel free to add this to the Authenticator class and send a pull request.

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

Successfully merging a pull request may close this issue.

2 participants