Skip to content

Commit

Permalink
fix: return oauth identity when user is created (#1736)
Browse files Browse the repository at this point in the history
## What kind of change does this PR introduce?
* When the oauth user is first created, the identity needs to be
returned in the user object as well.

## What is the current behavior?

Please link any relevant issues here.

## What is the new behavior?

Feel free to include screenshots if it includes visual changes.

## Additional context

Add any other context or screenshots.
  • Loading branch information
kangmingtay authored Aug 23, 2024
1 parent a6de8c9 commit 60cfb60
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/api/external.go
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ func (a *API) createAccountFromExternalIdentity(tx *storage.Connection, r *http.
if identity, terr = a.createNewIdentity(tx, user, providerType, identityData); terr != nil {
return nil, terr
}

user.Identities = append(user.Identities, *identity)
case models.AccountExists:
user = decision.User
identity = decision.Identities[0]
Expand Down

0 comments on commit 60cfb60

Please sign in to comment.