Implement redirect-path for password method

Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
Émile Ré
2026-02-10 16:59:05 +04:00
parent 660a37edd0
commit 070000c46a
11 changed files with 86 additions and 41 deletions

View File

@@ -321,12 +321,11 @@ func (s SessionService) OpenPasswordChildSessionForOrganization(
organizationID gid.GID,
) (*coredata.Session, *coredata.Membership, error) {
var (
now = time.Now()
rootSession = &coredata.Session{}
identity = &coredata.Identity{}
membership = &coredata.Membership{}
childSession = &coredata.Session{}
scope = coredata.NewScopeFromObjectID(organizationID)
now = time.Now()
rootSession = &coredata.Session{}
identity = &coredata.Identity{}
membership = &coredata.Membership{}
scope = coredata.NewScopeFromObjectID(organizationID)
)
err := s.pg.WithTx(
@@ -366,7 +365,7 @@ func (s SessionService) OpenPasswordChildSessionForOrganization(
}
tenantID := scope.GetTenantID()
childSession = &coredata.Session{
childSession := &coredata.Session{
ID: gid.New(tenantID, coredata.SessionEntityType),
IdentityID: rootSession.IdentityID,
TenantID: &tenantID,
@@ -399,7 +398,7 @@ func (s SessionService) OpenPasswordChildSessionForOrganization(
return nil, nil, err
}
return childSession, membership, nil
return rootSession, membership, nil
}
// OpenSAMLChildSessionForOrganization creates a SAML-authenticated child session for the given