JSONWebTokens.cfc icon indicating copy to clipboard operation
JSONWebTokens.cfc copied to clipboard

Not working with google api JWT

Open Tropicalista opened this issue 10 years ago • 0 comments

I've tested this lib with google api JWT, but I got error:

can't decode the base64 input string [notasecret], because the input 
string has an invalid length

notasecret is the default password for google Jwt. The error is probably due to Base64url encoding.

Something like this:

reReplace(reReplace(reReplace(str, "\+", "-", "all"), "\/", "_", "all"),"=", "", "all")

could resolve the issue.

Here are some reference: https://developers.google.com/identity/protocols/OAuth2ServiceAccount

Tropicalista avatar Nov 10 '15 03:11 Tropicalista