We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9fc1dd8 commit ddecae4Copy full SHA for ddecae4
1 file changed
apps/webapp/app/models/user.server.ts
@@ -247,11 +247,19 @@ export async function findOrCreateGoogleUser({
247
};
248
}
249
250
+ // When the IDP user (Google) already exists, the "update" path will be taken and the email will be updated
251
+ // It's not possible that the email is already taken by a different user because that would have been handled
252
+ // by one of the if statements above.
253
const user = await prisma.user.upsert({
254
where: {
255
authIdentifier,
256
},
- update: {},
257
+ update: {
258
+ email,
259
+ displayName,
260
+ name,
261
+ avatarUrl,
262
+ },
263
create: {
264
authenticationProfile: authProfile,
265
authenticationExtraParams: authExtraParams,
0 commit comments