mirror of
https://github.com/ArthurDanjou/arthome.git
synced 2026-01-14 12:14:33 +01:00
Trim username
This commit is contained in:
@@ -41,7 +41,7 @@ export default oauthGitHubEventHandler({
|
||||
|
||||
// If the user is not signed in and no user exists with that GitHub ID or email address, create a new user
|
||||
const createdUser = await createUser({
|
||||
username: oauthUser.login.toLowerCase() as string,
|
||||
username: oauthUser.login.toLowerCase().trim() as string,
|
||||
description: oauthUser.bio as string,
|
||||
name: oauthUser.name as string,
|
||||
email: oauthUser.email as string,
|
||||
|
||||
@@ -42,7 +42,7 @@ export default oauthGoogleEventHandler({
|
||||
|
||||
// If the user is not signed in and no user exists with that Google ID or email address, create a new user
|
||||
const createdUser = await createUser({
|
||||
username: oauthUser.name.toLowerCase() as string,
|
||||
username: oauthUser.name.toLowerCase().trim() as string,
|
||||
description: '',
|
||||
name: `${oauthUser.given_name} ${oauthUser.family_name}`,
|
||||
email: oauthUser.email as string,
|
||||
|
||||
Reference in New Issue
Block a user