Skip to content
New issue

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

feature/support taking callback_uri from custom configuration #39

Closed
robdembitel opened this issue Aug 22, 2023 · 2 comments
Closed

feature/support taking callback_uri from custom configuration #39

robdembitel opened this issue Aug 22, 2023 · 2 comments

Comments

@robdembitel
Copy link

Hello, would it be possible to also make it possible to set the callback path via the configuration file?

System.get_env("MICROSOFT_CALLBACK_PATH") || @default_callback_path

I would suggest to align it with the other environment variables, like here:

System.get_env("MICROSOFT_TOKEN_URL") || Application.get_env(:elixir_auth_microsoft, :token_url) || @default_token_url

so that set it also via the config file like e.g. this:

config :elixir_auth_microsoft,
  client_id: "",
  client_secret: "",
  post_logout_redirect_uri: "http://localhost:4000/auth/microsoft/logout",
  callback_uri: "http://localhost:4000/auth/microsoft/custom-callback-uri",

So this would be cool:

  defp get_callback_path do
    System.get_env("MICROSOFT_CALLBACK_PATH") || Application.get_env(:elixir_auth_microsoft, :callback_uri) || @default_callback_path
  end

Cheers!

@LuchoTurtle
Copy link
Member

Sure thing!
I'll open a micro-PR to get this working and publish it in the next version :)

@LuchoTurtle
Copy link
Member

Feature added and it's part of the v1.3.0 release of the package, which is already published. https://hex.pm/packages/elixir_auth_microsoft

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants