@alore/auth-react-sdk
Advanced tools
+11
-11
@@ -51,3 +51,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
| if (!this.services.isEmailAllowed(context, email)) { | ||
| throw new Error('Email domain not allowed'); | ||
| throw new AloreAuthError(ErrorTypes.EMAIL_DOMAIN_NOT_ALLOWED, 'Email domain not allowed', 400); | ||
| } | ||
@@ -87,3 +87,3 @@ const { credentialEmail } = context; | ||
| if (!this.services.isEmailAllowed(context, email)) { | ||
| throw new Error('Email domain not allowed'); | ||
| throw new AloreAuthError(ErrorTypes.EMAIL_DOMAIN_NOT_ALLOWED, 'Email domain not allowed', 400); | ||
| } | ||
@@ -127,3 +127,3 @@ const { firebaseCompatible } = context.authProviderConfigs || {}; | ||
| if (!this.services.isEmailAllowed(context, email)) { | ||
| throw new Error('Email domain not allowed'); | ||
| throw new AloreAuthError(ErrorTypes.EMAIL_DOMAIN_NOT_ALLOWED, 'Email domain not allowed', 400); | ||
| } | ||
@@ -162,3 +162,3 @@ const searchParams = new URLSearchParams(); | ||
| if (!this.services.isEmailAllowed(context, email)) { | ||
| return { error: 'Email domain not allowed' }; | ||
| throw new AloreAuthError(ErrorTypes.EMAIL_DOMAIN_NOT_ALLOWED, 'Email domain not allowed', 400); | ||
| } | ||
@@ -182,3 +182,3 @@ const response = yield this.fetchWithProgressiveBackoff(`/reset-password`, { | ||
| if (!this.services.isEmailAllowed(context, email || context.credentialEmail)) { | ||
| throw new Error('Email domain not allowed'); | ||
| throw new AloreAuthError(ErrorTypes.EMAIL_DOMAIN_NOT_ALLOWED, 'Email domain not allowed', 400); | ||
| } | ||
@@ -224,3 +224,3 @@ const { credentialEmail } = context; | ||
| if (email && !this.services.isEmailAllowed(context, email)) { | ||
| throw new Error('Email domain not allowed'); | ||
| throw new AloreAuthError(ErrorTypes.EMAIL_DOMAIN_NOT_ALLOWED, 'Email domain not allowed', 400); | ||
| } | ||
@@ -246,3 +246,3 @@ const startPasskeyRegistrationResponse = yield this.fetchWithProgressiveBackoff('/auth/v1/account-registration-passkey', { | ||
| if (email && !this.services.isEmailAllowed(context, email)) { | ||
| throw new Error('Email domain not allowed'); | ||
| throw new AloreAuthError(ErrorTypes.EMAIL_DOMAIN_NOT_ALLOWED, 'Email domain not allowed', 400); | ||
| } | ||
@@ -273,3 +273,3 @@ const response = yield this.fetchWithProgressiveBackoff('/auth/v1/account-registration-passkey-finish', { | ||
| if (email && !this.services.isEmailAllowed(context, email)) { | ||
| throw new Error('Email domain not allowed'); | ||
| throw new AloreAuthError(ErrorTypes.EMAIL_DOMAIN_NOT_ALLOWED, 'Email domain not allowed', 400); | ||
| } | ||
@@ -392,3 +392,3 @@ const searchParams = new URLSearchParams(); | ||
| if (!this.services.isEmailAllowed(context, email || credentialEmail)) { | ||
| throw new Error('Email domain not allowed'); | ||
| throw new AloreAuthError(ErrorTypes.EMAIL_DOMAIN_NOT_ALLOWED, 'Email domain not allowed', 400); | ||
| } | ||
@@ -473,3 +473,3 @@ const { firebaseCompatible } = authProviderConfigs || {}; | ||
| if (!this.services.isEmailAllowed(context, data.email)) { | ||
| throw new Error('Email domain not allowed'); | ||
| throw new AloreAuthError(ErrorTypes.EMAIL_DOMAIN_NOT_ALLOWED, 'Email domain not allowed', 400); | ||
| } | ||
@@ -489,3 +489,3 @@ return { | ||
| if (!this.services.isEmailAllowed(context, data.email)) { | ||
| throw new Error('Email domain not allowed'); | ||
| throw new AloreAuthError(ErrorTypes.EMAIL_DOMAIN_NOT_ALLOWED, 'Email domain not allowed', 400); | ||
| } | ||
@@ -492,0 +492,0 @@ return { |
@@ -8,2 +8,3 @@ export declare enum ErrorCodes { | ||
| CLIENT_ID_REQUIRED = "CLIENT_ID_REQUIRED", | ||
| EMAIL_DOMAIN_NOT_ALLOWED = "EMAIL_DOMAIN_NOT_ALLOWED", | ||
| PASSKEY_NOT_SUPPORTED = "PASSKEY_NOT_SUPPORTED", | ||
@@ -10,0 +11,0 @@ USER_ALREADY_EXISTS = "USER_ALREADY_EXISTS", |
@@ -11,2 +11,3 @@ /* eslint-disable no-unused-vars */ | ||
| ErrorTypes["CLIENT_ID_REQUIRED"] = "CLIENT_ID_REQUIRED"; | ||
| ErrorTypes["EMAIL_DOMAIN_NOT_ALLOWED"] = "EMAIL_DOMAIN_NOT_ALLOWED"; | ||
| ErrorTypes["PASSKEY_NOT_SUPPORTED"] = "PASSKEY_NOT_SUPPORTED"; | ||
@@ -13,0 +14,0 @@ ErrorTypes["USER_ALREADY_EXISTS"] = "USER_ALREADY_EXISTS"; |
+1
-1
| { | ||
| "name": "@alore/auth-react-sdk", | ||
| "version": "1.1.0-alpha.3", | ||
| "version": "1.1.0-alpha.4", | ||
| "repository": "https://github.com/0xCarbon/alore-js", | ||
@@ -5,0 +5,0 @@ "description": "SDK for Alore Auth", |
74483
0.94%1067
0.19%