Skip to content

Commit 567efaf

Browse files
Display error if username is not valid
1 parent c70685c commit 567efaf

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

newIDE/app/src/Profile/EditProfileDialog.js

+2
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ export const getUsernameErrorText = (error: ?AuthError) => {
3131

3232
if (error.code === 'auth/username-used')
3333
return 'This username is already used, please pick another one.';
34+
if (error.code === 'auth/malformed-username')
35+
return 'Please pick a short username with only alphanumeric characters as well as _ and -';
3436
return undefined;
3537
};
3638

newIDE/app/src/Utils/GDevelopServices/Authentication.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ export type AuthError = {
4747
| 'auth/email-already-in-use'
4848
| 'auth/operation-not-allowed'
4949
| 'auth/weak-password'
50-
| 'auth/username-used',
50+
| 'auth/username-used'
51+
| 'auth/malformed-username',
5152
};
5253

5354
export default class Authentication {

0 commit comments

Comments
 (0)