UNPKG

@passageidentity/passage-react-native

Version:

Passkey Complete for React Native - Go completely passwordless with a standalone auth solution in your React Native app with Passage by 1Password

39 lines (38 loc) 1.81 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.PassageErrorCode = exports.PassageError = void 0; let PassageErrorCode = exports.PassageErrorCode = /*#__PURE__*/function (PassageErrorCode) { PassageErrorCode["PasskeyError"] = "PASSKEY_ERROR"; PassageErrorCode["PasskeysNotSupported"] = "PASSKEYS_NOT_SUPPORTED"; PassageErrorCode["UserCancelled"] = "USER_CANCELLED"; PassageErrorCode["UserUnauthorized"] = "USER_UNAUTHORIZED"; PassageErrorCode["ChangeEmailError"] = "CHANGE_EMAIL_ERROR"; PassageErrorCode["ChangePhoneError"] = "CHANGE_PHONE_ERROR"; PassageErrorCode["OTPError"] = "OTP_ERROR"; PassageErrorCode["MagicLinkError"] = "MAGIC_LINK_ERROR"; PassageErrorCode["MagicLinkInvalid"] = "MAGIC_LINK_INVALID"; PassageErrorCode["TokenError"] = "TOKEN_ERROR"; PassageErrorCode["AppInfoError"] = "APP_INFO_ERROR"; PassageErrorCode["SocialAuthError"] = "SOCIAL_AUTH_ERROR"; PassageErrorCode["StartHostedAuthError"] = "START_HOSTED_AUTH_ERROR"; PassageErrorCode["FinisHostedAuthError"] = "FINISH_HOSTED_AUTH_ERROR"; PassageErrorCode["LogoutHostedAuthError"] = "LOGOUT_HOSTED_AUTH_ERROR"; PassageErrorCode["UpdateMetadataError"] = "UPDATE_METADATA_ERROR"; PassageErrorCode["GetMetadataError"] = "GET_METADATA_ERROR"; PassageErrorCode["DeleteSocialConnectionError"] = "DELETE_SOCIAL_CONNECTION_ERROR"; PassageErrorCode["CreateUserError"] = "CREATE_USER_ERROR"; return PassageErrorCode; }({}); class PassageError extends Error { constructor(code, message) { super(message); // This line is necessary to preserve the correct instanceof checks this.code = code; Object.setPrototypeOf(this, new.target.prototype); this.name = code; } } exports.PassageError = PassageError; //# sourceMappingURL=PassageError.js.map