mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-18 05:25:40 +09:00
feat(auth): add username sign-in mode and recovery kits (#3215)
This commit is contained in:
1 parent
bf3d73a5f7
commit
e1eecc3b6c
355 files changed
+52138
-24097
No files matched your search
@@ -11,6 +11,7 @@ type AllErrorCodes = APIErrorCode | ValidationErrorCode;
|
||||
export const ErrorCodeToI18nKey = {
|
||||
[APIErrorCodes.ACCESS_DENIED]: 'permissions.missing_access',
|
||||
[APIErrorCodes.ACCOUNT_LIMITED]: 'account.limited',
|
||||
[APIErrorCodes.ACCOUNT_IDENTITY_LOCKED]: 'auth_and_registration.account_identity_locked',
|
||||
[APIErrorCodes.ACCOUNT_SUSPENDED_PERMANENTLY]: 'account.suspended_permanently',
|
||||
[APIErrorCodes.ACCOUNT_SUSPENDED_TEMPORARILY]: 'account.suspended_temporarily',
|
||||
[APIErrorCodes.ACCOUNT_TOO_NEW_FOR_GUILD]: 'account.too_new_for_guild',
|
||||
@@ -315,6 +316,8 @@ export const ErrorCodeToI18nKey = {
|
||||
[APIErrorCodes.UNKNOWN_WEBHOOK]: 'webhooks.unknown_webhook',
|
||||
[APIErrorCodes.UPDATE_FAILED]: 'admin_and_system.update_failed',
|
||||
[APIErrorCodes.USERNAME_NOT_AVAILABLE]: 'usernames_and_tags.username_not_available',
|
||||
[APIErrorCodes.USERNAME_SIGN_IN_ONLY]: 'auth_and_registration.username_sign_in_only',
|
||||
[APIErrorCodes.EMAIL_UNAVAILABLE_ON_INSTANCE]: 'email.unavailable_on_instance',
|
||||
[APIErrorCodes.USER_BANNED_FROM_GUILD]: 'permissions.user_banned_from_guild',
|
||||
[APIErrorCodes.USER_IP_BANNED_FROM_GUILD]: 'permissions.user_ip_banned_from_guild',
|
||||
[APIErrorCodes.USER_NOT_IN_VOICE]: 'permissions.user_not_in_voice',
|
||||
@@ -389,6 +392,9 @@ export const ErrorCodeToI18nKey = {
|
||||
[ValidationErrorCodes.CHANGING_DISCRIMINATOR_REQUIRES_PREMIUM]:
|
||||
'premium_and_plans.discriminator_change_requires_premium',
|
||||
[ValidationErrorCodes.DISCRIMINATOR_INVALID_FORMAT]: 'usernames_and_tags.discriminator_invalid_format',
|
||||
[ValidationErrorCodes.DISCRIMINATOR_NOT_SUPPORTED_ON_INSTANCE]:
|
||||
'usernames_and_tags.discriminator_not_supported_on_instance',
|
||||
[ValidationErrorCodes.TAG_STYLE_REQUIRES_EMAIL_SIGN_IN]: 'usernames_and_tags.tag_style_requires_email_sign_in',
|
||||
[ValidationErrorCodes.DISCRIMINATOR_OUT_OF_RANGE]: 'usernames_and_tags.discriminator_out_of_range',
|
||||
[ValidationErrorCodes.GLOBAL_NAME_CANNOT_CONTAIN_RESERVED_TERMS]: 'usernames_and_tags.display_name_reserved_terms',
|
||||
[ValidationErrorCodes.GLOBAL_NAME_LENGTH_INVALID]: 'usernames_and_tags.global_name_length_invalid',
|
||||
@@ -400,6 +406,7 @@ export const ErrorCodeToI18nKey = {
|
||||
'usernames_and_tags.unclaimed_accounts_can_only_set_email_via_token',
|
||||
[ValidationErrorCodes.USERNAME_CANNOT_CONTAIN_RESERVED_TERMS]: 'usernames_and_tags.username_reserved_terms',
|
||||
[ValidationErrorCodes.USERNAME_INVALID_CHARACTERS]: 'usernames_and_tags.username_invalid_characters',
|
||||
[ValidationErrorCodes.USERNAME_ALREADY_TAKEN]: 'usernames_and_tags.username_already_taken',
|
||||
[ValidationErrorCodes.USERNAME_LENGTH_INVALID]: 'usernames_and_tags.username_length_invalid',
|
||||
[ValidationErrorCodes.USERNAME_RESERVED_VALUE]: 'usernames_and_tags.username_reserved_value',
|
||||
[ValidationErrorCodes.VISIONARY_REQUIRED_FOR_DISCRIMINATOR]: 'premium_and_plans.visionary_required_for_discriminator',
|
||||
@@ -414,6 +421,9 @@ export const ErrorCodeToI18nKey = {
|
||||
[ValidationErrorCodes.EMAIL_MUST_BE_CHANGED_VIA_TOKEN]: 'email.must_be_changed_via_token',
|
||||
[ValidationErrorCodes.EMAIL_TOKEN_EXPIRED]: 'email.token_expired',
|
||||
[ValidationErrorCodes.INVALID_EMAIL_OR_PASSWORD]: 'email.invalid_or_password',
|
||||
[ValidationErrorCodes.INVALID_LOGIN_OR_PASSWORD]: 'auth_and_registration.invalid_login_or_password',
|
||||
[ValidationErrorCodes.INSTANCE_ADDRESS_REQUIRED]: 'auth_and_registration.instance_address_required',
|
||||
[ValidationErrorCodes.INVALID_RECOVERY_KEY]: 'auth_and_registration.invalid_recovery_key',
|
||||
[ValidationErrorCodes.INVALID_EMAIL_TOKEN]: 'email.invalid_token',
|
||||
[ValidationErrorCodes.INVALID_VERIFICATION_CODE]: 'email.invalid_verification_code',
|
||||
[ValidationErrorCodes.INVALID_OR_EXPIRED_VERIFICATION_TOKEN]: 'email.invalid_or_expired_verification_token',
|
||||
|
||||
Reference in new issue
Block a user