apps-script-oauth2 icon indicating copy to clipboard operation
apps-script-oauth2 copied to clipboard

Code verifier

Open GenaAiv opened this issue 2 years ago • 2 comments

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?

GenaAiv avatar Feb 14 '23 16:02 GenaAiv

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

https://github.com/googleworkspace/apps-script-oauth2/blob/67cae4034d0936dbe90b95f74cddd1ad35d799fd/test/test.js#L508-L513

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

erickoledadevrel avatar Feb 15 '23 14:02 erickoledadevrel

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

GenaAiv avatar Feb 15 '23 18:02 GenaAiv