mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 00:47:33 +00:00
fix: primary domain scope (handle context correctly) (#3872)
This commit is contained in:
@@ -137,7 +137,7 @@ func (repo *AuthRequestRepo) CreateAuthRequest(ctx context.Context, request *dom
|
||||
request.AppendAudIfNotExisting(project.ID)
|
||||
request.ApplicationResourceOwner = project.ResourceOwner
|
||||
request.PrivateLabelingSetting = project.PrivateLabelingSetting
|
||||
if err := setOrgID(repo.OrgViewProvider, request); err != nil {
|
||||
if err := setOrgID(ctx, repo.OrgViewProvider, request); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if request.LoginHint != "" {
|
||||
@@ -1053,13 +1053,13 @@ func (repo *AuthRequestRepo) hasSucceededPage(ctx context.Context, request *doma
|
||||
return app.OIDCConfig.AppType == domain.OIDCApplicationTypeNative, nil
|
||||
}
|
||||
|
||||
func setOrgID(orgViewProvider orgViewProvider, request *domain.AuthRequest) error {
|
||||
func setOrgID(ctx context.Context, orgViewProvider orgViewProvider, request *domain.AuthRequest) error {
|
||||
primaryDomain := request.GetScopeOrgPrimaryDomain()
|
||||
if primaryDomain == "" {
|
||||
return nil
|
||||
}
|
||||
|
||||
org, err := orgViewProvider.OrgByDomainGlobal(context.TODO(), primaryDomain)
|
||||
org, err := orgViewProvider.OrgByDomainGlobal(ctx, primaryDomain)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
Reference in New Issue
Block a user