@@ -5,11 +5,28 @@ extends WindowDialog
55# var a = 2
66# var b = "text"
77var errors = {
8- " INVALID_EMAIL" : " Invalid email address" ,
9- " EMAIL_NOT_FOUND" : " Email address not found" ,
10- " INVALID_PASSWORD" : " Invalid password" ,
11- " USER_DISABLED" : " That user is disabled/banned" ,
12- " WEAK_PASSWORD" : " Weak password. It must be at least 6 characters long" }
8+ " USER_NOT_FOUND" : " The user corresponding to the refresh token was not found. It is likely the user was deleted." ,
9+ " TOKEN_EXPIRED" : " The user's credential is no longer valid. The user must sign in again." ,
10+ " INVALID_CUSTOM_TOKEN" : " The custom token format is incorrect or the token is invalid for some reason (e.g. expired, invalid signature etc.)" ,
11+ " CREDENTIAL_MISMATCH" : " The custom token corresponds to a different Firebase project." ,
12+ " INVALID_REFRESH_TOKEN" : " An invalid refresh token is provided." ,
13+ " INVALID_GRANT_TYPE" : " The grant type specified is invalid." ,
14+ " MISSING_REFRESH_TOKEN" : " No refresh token provided." ,
15+ " EMAIL_EXISTS" : " The email address is already in use by another account." ,
16+ " OPERATION_NOT_ALLOWED" : " This feature is disabled for this project." ,
17+ " TOO_MANY_ATTEMPTS_TRY_LATER" : " We have blocked all requests from this device due to unusual activity. Try again later." ,
18+ " EMAIL_NOT_FOUND" : " There is no user record corresponding to this identifier. The user may have been deleted." ,
19+ " INVALID_PASSWORD" : " The password is invalid or the user does not have a password." ,
20+ " USER_DISABLED" : " The user account has been disabled by an administrator." ,
21+ " INVALID_IDP_RESPONSE" : " The supplied auth credential is malformed or has expired." ,
22+ " INVALID_EMAIL" : " The email address is badly formatted." ,
23+ " EXPIRED_OOB_CODE" : " The action code has expired." ,
24+ " INVALID_OOB_CODE" : " The action code is invalid. This can happen if the code is malformed, expired, or has already been used." ,
25+ " INVALID_ID_TOKEN" : " The user's credential is no longer valid. The user must sign in again." ,
26+ " WEAK_PASSWORD" : " The password must be 6 characters long or more." ,
27+ " CREDENTIAL_TOO_OLD_LOGIN_AGAIN" : " The user's credential is no longer valid. The user must sign in again." ,
28+ " FEDERATED_USER_ID_ALREADY_LINKED" : " This credential is already associated with a different user account." ,
29+ }
1330
1431# Called when the node enters the scene tree for the first time.
1532func _ready():
@@ -22,7 +39,10 @@ func _ready():
2239func on_login_failed(error_code, message):
2340 print(" error code: " + str(error_code))
2441 print(" message: " + str(message))
25- $Error.dialog_text = " Error: " + errors[ message]
42+ if errors.has(message):
43+ $Error.dialog_text = " Error: " + errors[ message] + " \n\n Error code: " + str(error_code)
44+ else :
45+ $Error.dialog_text = " Oops!\n Unknown error happened!\n\n Error code: " + str(error_code)
2646 $Error.popup_centered()
2747
2848func _on_Login_pressed():
0 commit comments