fix: handle existing oAuth client ID in user email to prevent duplication (#22021)

* fix: handle existing oAuth client ID in user email to prevent duplication

* fix: update OAuth user email validation
This commit is contained in:
Somay Chauhan authored and GitHub committed 2025-06-26 08:29:29 +00:00
1 parent aea0661303
commit 6983179b2f
1 file changed
+3
@@ -144,6 +144,9 @@ export class OAuthClientUsersService {
}
static getOAuthUserEmail(oAuthClientId: string, userEmail: string) {
if (userEmail.includes(`+${oAuthClientId}@`)) {
return userEmail;
}
const [username, emailDomain] = userEmail.split("@");
return `${username}+${oAuthClientId}@${emailDomain}`;
}