fix: update email field given by oidc provider
This commit is contained in:
parent
7a75f8f526
commit
33d4fa66c8
1 changed files with 2 additions and 2 deletions
|
|
@ -96,14 +96,14 @@ defmodule Mv.Accounts.User do
|
||||||
argument :oauth_tokens, :map, allow_nil?: false
|
argument :oauth_tokens, :map, allow_nil?: false
|
||||||
prepare AshAuthentication.Strategy.OAuth2.SignInPreparation
|
prepare AshAuthentication.Strategy.OAuth2.SignInPreparation
|
||||||
|
|
||||||
filter expr(email == get_path(^arg(:user_info), [:email]))
|
filter expr(email == get_path(^arg(:user_info), [:preferred_username]))
|
||||||
end
|
end
|
||||||
|
|
||||||
create :register_with_rauthy do
|
create :register_with_rauthy do
|
||||||
argument :user_info, :map, allow_nil?: false
|
argument :user_info, :map, allow_nil?: false
|
||||||
argument :oauth_tokens, :map, allow_nil?: false
|
argument :oauth_tokens, :map, allow_nil?: false
|
||||||
upsert? true
|
upsert? true
|
||||||
upsert_identity :unique_email
|
upsert_identity :unique_oidc_id
|
||||||
|
|
||||||
change AshAuthentication.GenerateTokenChange
|
change AshAuthentication.GenerateTokenChange
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue