Closed nikkomiu closed 7 years ago
@nikkomiu Thanks for the PR but I don't think this is something we want to include in the library. If you're deploying with Distillery you should look into using the REPLACE_OS_VARS
option, then your config would look like this:
config :ueberauth, Ueberauth.Strategy.Google.OAuth,
client_id: "${GOOGLE_CLIENT_ID}",
client_secret: "${GOOGLE_CLIENT_SECRET}"
$ REPLACE_OS_VARS=true GOOGLE_CLIENT_ID= GOOGLE_CLIENT_SECRET= bin/myapp start
That is the exact configuration option that Distillery recommends not using though.
@nikkomiu I believe there is a misunderstanding. Distillery discourages the use of this form of configuration:
config :ueberauth, Ueberauth.Strategy.Google.OAuth,
client_id: {:system, "GOOGLE_CLIENT_ID"},
client_secret: {:system, "GOOGLE_CLIENT_SECRET"}
They do not discourage the use of REPLACE_OS_VARS
, see here: https://github.com/bitwalker/distillery/blob/4705312a77e9667bd98f70e5c7a8c24a01fdac34/docs/Runtime%20Configuration.md#vmargs
Added support for runtime environment variables.
This will better allow for the use of packages like Distillery. The Distillery documentation says that
{:system, "VAR"}
should no longer be used.