From 8091522cfb983d50194d867c4c6103243af7663b Mon Sep 17 00:00:00 2001 From: Dan Schultzer <1254724+danschultzer@users.noreply.github.com> Date: Sun, 10 Mar 2024 06:44:55 -0700 Subject: [PATCH] Fix multiprovider config example --- README.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 199a00e..e70e810 100644 --- a/README.md +++ b/README.md @@ -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