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:
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}`;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user