peburrows / goth

Elixir package for Oauth authentication via Google Cloud APIs
http://hexdocs.pm/goth
MIT License
284 stars 108 forks source link

Generate an impersonated token using a service account #156

Closed Wlojtek closed 1 year ago

Wlojtek commented 1 year ago

When I tried to hit gmail api (to send mails) I had to provide scopes and IMPERSONATED_ACCOUNT_EMAIL in claims list.

The documentation say for Goth.Token.fetch/1 :

:scopes - the list of token scopes, defaults to ["https://www.googleapis.com/auth/cloud-platform"] (ignored if :claims present)

I was not able to get it working using Goth.Token.fetch/1 only by using old Goth.Token.for_scope/2 function. Is there any way allow provide both claims and scopes into Goth.Token.fetch/1?

Wlojtek commented 1 year ago

closing by https://github.com/peburrows/goth/issues/155