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

[PR] Adding way to add callback path in config files. #49

Merged
merged 1 commit into from
Feb 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,12 @@ get "/auth/microsoft/callback", MicrosoftAuthController, :index

With all that hooked up you should now have everything working.

> [!NOTE]
>
> You can define your callback path with an environment variable
> `MICROSOFT_CALLBACK_PATH`
> or by using the config property `:callback_path` in your config files.

### 6.1 Give it a try!

The home page of the app
Expand Down
2 changes: 1 addition & 1 deletion demo/lib/app_web/microsoft_auth.ex
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ defmodule ElixirAuthMicrosoft do
end

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


Expand Down
2 changes: 1 addition & 1 deletion lib/elixir_auth_microsoft.ex
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ defmodule ElixirAuthMicrosoft do
end

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


Expand Down
Loading