Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Commit

Permalink
fix: Update addIdentityProviderType function to check for userId when…
Browse files Browse the repository at this point in the history
… type is 'guest'
  • Loading branch information
MoizAdnan committed Aug 14, 2024
1 parent b1f898a commit e688d3d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ async function addIdentityProviderType(context: HookContext<IdentityProviderServ
;(context.actualData as IdentityProviderData).type = 'guest' //Non-password/magiclink create requests must always be for guests
}

if ((context.data as IdentityProviderData).type === 'guest') {
if ((context.data as IdentityProviderData).type === 'guest' && (context.actualData as IdentityProviderData).userId) {
const existingUser = await context.app.service(userPath).find({
query: {
id: (context.actualData as IdentityProviderData).userId
Expand Down

0 comments on commit e688d3d

Please sign in to comment.