We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
config :ueberauth, Ueberauth, providers: [ keycloak: {Ueberauth.Strategy.Keycloak, [uid_field: :email, default_scope: "openid profile"]} ]
default_scope
Calling Ueberauth.Strategy.Helpers.options/1 always returns the current options at runtime.
Ueberauth.Strategy.Helpers.options/1
Strategy options are set at compile time and runtime configuration isn't respected.
The text was updated successfully, but these errors were encountered:
Having the same issue... has anyone have any tip to configure it in runtime? Thanks!
Sorry, something went wrong.
It appears the issue is the providers: setting is read only in init/1, and normally phoenix/plug init_mode is :compile in production.
providers:
init/1
init_mode
:compile
A workaround to make just ueberauth read settings at run-time is to write a plug wrapper (based on https://akoutmos.com/post/plug-runtime-config/):
defmodule YourApp.Ueberauth do @behaviour Plug @impl true def init(opts) do opts end @impl true def call(conn, opts) do conn |> Ueberauth.call(Ueberauth.init(opts)) end end
and in your Auth controller
plug YourApp.Ueberauth
Configure Ueberauth at runtime instead of compile time
a62ab9d
ueberauth/ueberauth#170
No branches or pull requests
Steps to Reproduce
default_scope
still uses the default from the strategy.Expected Result
Calling
Ueberauth.Strategy.Helpers.options/1
always returns the current options at runtime.Actual Result
Strategy options are set at compile time and runtime configuration isn't respected.
The text was updated successfully, but these errors were encountered: