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

Code verifier #432

Open
GenaAiv opened this issue Feb 14, 2023 · 2 comments
Open

Code verifier #432

GenaAiv opened this issue Feb 14, 2023 · 2 comments
Assignees

Comments

@GenaAiv
Copy link

GenaAiv commented Feb 14, 2023

I am trying to use this library but it is not very clear if the CodeVerifier works automatically, or if you gotta turn it on somehow?

@erickoledadevrel
Copy link
Contributor

Hi @GenaAiv - Looking through the tests, I think you need to add a call to .generateCodeVerifier() when defining your service.

var service = OAuth2.createService('test')
.setAuthorizationBaseUrl('http://www.example.com')
.setClientId('abc')
.setClientSecret('def')
.setCallbackFunction('authCallback')
.generateCodeVerifier();

Probably a good idea to add some information about PKCE support to the README though.

@GenaAiv
Copy link
Author

GenaAiv commented Feb 15, 2023

I had that but it did not seem to work at first. Looks like it does work now.. I had an issue with code_verifier not being sent in the token request, which was required.. but after i copied the script locally it seem to work again

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

3 participants