Skip to content

Commit

Permalink
chore: get final organization ID from provider config during registra…
Browse files Browse the repository at this point in the history
…tion
  • Loading branch information
alnr committed Sep 2, 2024
1 parent 6e07440 commit c0bf316
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion selfservice/strategy/oidc/strategy_registration.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
"time"

"github.com/dgraph-io/ristretto"
"github.com/gofrs/uuid"
"github.com/pkg/errors"
"github.com/tidwall/gjson"
"github.com/tidwall/sjson"
Expand Down Expand Up @@ -400,7 +401,9 @@ func (s *Strategy) createIdentity(ctx context.Context, w http.ResponseWriter, r
return nil, nil, s.handleError(ctx, w, r, a, provider.Config().ID, i.Traits, err)
}

i.OrganizationID = a.OrganizationID
if orgID, err := uuid.FromString(provider.Config().OrganizationID); err == nil {
i.OrganizationID = uuid.NullUUID{UUID: orgID, Valid: true}
}

s.d.Logger().
WithRequest(r).
Expand Down

0 comments on commit c0bf316

Please sign in to comment.