Skip to content

Commit

Permalink
Fix multiprovider config example
Browse files Browse the repository at this point in the history
  • Loading branch information
danschultzer committed Mar 10, 2024
1 parent 7a629ae commit 8091522
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,15 +166,16 @@ defmodule MultiProviderAuth do

@spec request(atom()) :: {:ok, map()} | {:error, term()}
def request(provider) do
provider
|> config!()
|> config[:strategy].authorize_url()
config = config!(provider)

config[:strategy].authorize_url()
end

@spec callback(atom(), map(), map()) :: {:ok, map()} | {:error, term()}
def callback(provider, params, session_params) do
provider
|> config!()
config = config!(provider)

config
|> Assent.Config.put(:session_params, session_params)
|> config[:strategy].callback(params)
end
Expand Down

0 comments on commit 8091522

Please sign in to comment.