Working with goth in Elixir?

I maintain this Elixir application that is using goth for OAuth with Google.

All that it does is to configure goth like this is runtime.exs:

config :goth, json: “/my/path/to/goth.json” |> File.read!()

and then gets the token like this:

Goth.Token.for_scope(...)

Can somebody explain how goth works?

First of all, how can I understand which library depends on goth?

Second, who starts the goth app, since there is no explicit call to its start?

Also, if I want to configure goth programmatically, how should I do it?

Thanks!

I know nothing about goth, but glancing at the changelog it seems you may be on an older version: Upgrading from Goth 1.2 — Goth v1.4.5

1 Like

To find which lib depends on goth in your project you can use mix deps.tree.

goth is a mix project that has an application module defined in its mix.exs file, this gets started automatically, that’s why sometimes you have to add runtime: false to a dependency to not have it start automatically.

For how to configure goth programmatically, the newer version seems to document that on Hexdocs.