peburrows/goth

Generate an impersonated token using a service account

Wlojtek opened this issue · 1 comments

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?

closing by #155