set SAMLSubject on create

Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
Émile Ré
2026-02-13 18:59:07 +04:00
parent 8c2d934df0
commit 063e1107ee

View File

@@ -261,6 +261,7 @@ func (s *Service) HandleAssertion(
*identity = coredata.Identity{
ID: gid.New(gid.NilTenant, coredata.IdentityEntityType),
EmailAddress: email,
SAMLSubject: &assertion.Subject.NameID.Value,
FullName: fullname,
HashedPassword: nil,
EmailAddressVerified: true,
@@ -275,7 +276,6 @@ func (s *Service) HandleAssertion(
} else if err != nil {
return fmt.Errorf("cannot load identity: %w", err)
} else {
identity.SAMLSubject = &assertion.Subject.NameID.Value
identity.EmailAddress = email
identity.FullName = fullname
identity.EmailAddressVerified = true