ueberauth / ueberauth_twitter

Twitter Strategy for Überauth
MIT License
36 stars 38 forks source link

Runtime configuration #40

Closed IvanIvanoff closed 3 years ago

IvanIvanoff commented 3 years ago

It is not possible to configure the twitter credentials at runtime - they must be present and compile time.

Other ueberauth providers, like ueberauth_google provide such functionality like this:

config :ueberauth, Ueberauth.Strategy.Google.OAuth,
  client_id: {System, :get_env, ["GOOGLE_CLIENT_ID"]},
  client_secret: {System, :get_env, ["GOOGLE_CLIENT_SECRET"]}

An example implementation can be found in this PR: https://github.com/ueberauth/ueberauth_twitter/pull/39

chulkilee commented 3 years ago

In Elixir 1.11, this can be given at config/runtime.exs. Even before that, config/release.exs can be used to give runtime value if using mix release.

You can see config/runtime.exs example at https://github.com/ueberauth/ueberauth_example/pull/68