oauth2 icon indicating copy to clipboard operation
oauth2 copied to clipboard

Retrieve a user's idToken

Open marwan-at-work opened this issue 5 years ago • 1 comments

I'd love to use this library to achieve the equivalent of what the following command does:

gcloud auth print-identity-token

I believe I can use google.FindDefaultCredentials() to retrieve the current authenticated user. However, I am not sure if there's a way to print an "identity token" in particular.

Is it possible to do such a thing with this library?

Thanks!

marwan-at-work avatar Oct 14 '20 06:10 marwan-at-work

Very old issue, but I am also very interested in this scenario. There should be ways to do this without shelling out to gcloud, surely.

leosunmo avatar Jul 01 '23 12:07 leosunmo