fix: set oidc_id from user_info["sub"]

This commit is contained in:
Moritz 2025-07-17 22:33:42 +02:00
parent 96434c020b
commit 25919470d9
Signed by: moritz
GPG key ID: 1020A035E5DD0824

View file

@ -91,7 +91,7 @@ defmodule Mv.Accounts.User do
changeset
|> Ash.Changeset.change_attribute(:email, user_info["preferred_username"])
|> Ash.Changeset.change_attribute(:oidc_id, user_info["id"])
|> Ash.Changeset.change_attribute(:oidc_id, user_info["sub"] || user_info["id"])
end
end
end