peburrows / goth

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

v1.2 API to get token from metadata server is broken #136

Closed wojtekmach closed 2 years ago

wojtekmach commented 2 years ago

Goth v1.2 and earlier automatically starts Goth.Config which would do the "Application Default Credentials" heuristic, checking common files for credentials, falling back to calling Google internal metadata service, or otherwise failing.

In v1.3 we are deprecating implicit config in favour of explicitly starting Goth token cache servers in user's supervision trees. If a user had configured :goth application env, we'd start the "legacy" supervisor for them but if they didn't, we wouldn't.

This unfortunately breaks users who relied on getting token from the metadata service. For them, it worked with zero application env configuration.

This is a blocker for v1.3 release. Perhaps we cannot fix it and thus should rather ship Goth v2.0.

wojtekmach commented 2 years ago

This is fixed on master by lazily starting Goth.Config server.