Attempting to test this with a okta.com test setup. Have this setup such that the first token grab works correctly. The second invocation, when it tries to do a refresh, I get the following:
took token okla <user>
DEBU[0000] There is an access token, validating
DEBU[0000] Validation error: <nil>
FATA[0005] Cannot get server info for https://<instance>.oktapreview.com/: invalid character '<' looking for beginning of value
Looks like it was pulling down https://<instance>.oktapreview.com/, instead of the correct URL that returns the JWKS, which would be https://<instance>.oktapreview.com/oauth2/default/v1/keys
took needs to query for the JWKS url via openid connect discovery.
took needs to support a config option to point to the correct JWKS location.
I tried bypassing the issue by hardcoding the correct URL, and get a new error:
took -v token okla <user>
DEBU[0000] There is an access token, validating
DEBU[0000] Validation error: <nil>
About to get: https://<instance>.oktapreview.com/oauth2/default/v1/keys
FATA[0000] Cannot get server info for https://<instance>.oktapreview.com/: asn1: syntax error: sequence truncated
Attempting to test this with a okta.com test setup. Have this setup such that the first token grab works correctly. The second invocation, when it tries to do a refresh, I get the following:
Looks like it was pulling down
https://<instance>.oktapreview.com/
, instead of the correct URL that returns the JWKS, which would behttps://<instance>.oktapreview.com/oauth2/default/v1/keys
So a few potential issues:
I tried bypassing the issue by hardcoding the correct URL, and get a new error:
Here's my slightly modified .took.yaml: