Skip to content

Commit

Permalink
Attach relevant payload on Teams and Cloudflare ZTA
Browse files Browse the repository at this point in the history
  • Loading branch information
josevalim committed Dec 6, 2024
1 parent 2d9b6f8 commit d924a9a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/livebook/zta/cloudflare.ex
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ defmodule Livebook.ZTA.Cloudflare do
{:ok, token} <- verify_token(encoded_token, keys),
:ok <- verify_iss(token, identity.iss),
{:ok, user} <- get_user_identity(encoded_token, identity.user_identity) do
for({k, v} <- user, new_k = @fields[k], do: {new_k, v}, into: %{payload: token.fields})
for({k, v} <- user, new_k = @fields[k], do: {new_k, v}, into: %{payload: user})
else
_ -> nil
end
Expand Down
2 changes: 1 addition & 1 deletion lib/livebook/zta/livebook_teams.ex
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ defmodule Livebook.ZTA.LivebookTeams do
name: name,
avatar_url: avatar_url,
email: email,
payload: %{"access_token" => access_token}
payload: Map.put(payload, "access_token", access_token)
}

{:ok, metadata}
Expand Down

0 comments on commit d924a9a

Please sign in to comment.