UNPKG

@aws-amplify/auth

Version:
1 lines 3.14 kB
{"version":3,"file":"constants.mjs","sources":["../../../src/errors/constants.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { AuthError } from './AuthError';\nexport const USER_UNAUTHENTICATED_EXCEPTION = 'UserUnAuthenticatedException';\nexport const USER_ALREADY_AUTHENTICATED_EXCEPTION = 'UserAlreadyAuthenticatedException';\nexport const DEVICE_METADATA_NOT_FOUND_EXCEPTION = 'DeviceMetadataNotFoundException';\nexport const AUTO_SIGN_IN_EXCEPTION = 'AutoSignInException';\nexport const INVALID_REDIRECT_EXCEPTION = 'InvalidRedirectException';\nexport const INVALID_APP_SCHEME_EXCEPTION = 'InvalidAppSchemeException';\nexport const INVALID_PREFERRED_REDIRECT_EXCEPTION = 'InvalidPreferredRedirectUrlException';\nexport const invalidRedirectException = new AuthError({\n name: INVALID_REDIRECT_EXCEPTION,\n message: 'signInRedirect or signOutRedirect had an invalid format or was not found.',\n recoverySuggestion: 'Please make sure the signIn/Out redirect in your oauth config is valid.',\n});\nexport const invalidAppSchemeException = new AuthError({\n name: INVALID_APP_SCHEME_EXCEPTION,\n message: 'A valid non-http app scheme was not found in the config.',\n recoverySuggestion: 'Please make sure a valid custom app scheme is present in the config.',\n});\nexport const invalidPreferredRedirectUrlException = new AuthError({\n name: INVALID_PREFERRED_REDIRECT_EXCEPTION,\n message: 'The given preferredRedirectUrl does not match any items in the redirectSignOutUrls array from the config.',\n recoverySuggestion: 'Please make sure a matching preferredRedirectUrl is provided.',\n});\nexport const INVALID_ORIGIN_EXCEPTION = 'InvalidOriginException';\nexport const invalidOriginException = new AuthError({\n name: INVALID_ORIGIN_EXCEPTION,\n message: 'redirect is coming from a different origin. The oauth flow needs to be initiated from the same origin',\n recoverySuggestion: 'Please call signInWithRedirect from the same origin.',\n});\nexport const OAUTH_SIGNOUT_EXCEPTION = 'OAuthSignOutException';\nexport const TOKEN_REFRESH_EXCEPTION = 'TokenRefreshException';\nexport const UNEXPECTED_SIGN_IN_INTERRUPTION_EXCEPTION = 'UnexpectedSignInInterruptionException';\n"],"names":[],"mappings":";;AAAA;AACA;AAEY,MAAC,8BAA8B,GAAG;AAClC,MAAC,oCAAoC,GAAG;AACxC,MAAC,mCAAmC,GAAG;AACvC,MAAC,sBAAsB,GAAG;AAC1B,MAAC,0BAA0B,GAAG;AAC9B,MAAC,4BAA4B,GAAG;AAChC,MAAC,oCAAoC,GAAG;AACxC,MAAC,wBAAwB,GAAG,IAAI,SAAS,CAAC;AACtD,IAAI,IAAI,EAAE,0BAA0B;AACpC,IAAI,OAAO,EAAE,2EAA2E;AACxF,IAAI,kBAAkB,EAAE,yEAAyE;AACjG,CAAC;AACW,MAAC,yBAAyB,GAAG,IAAI,SAAS,CAAC;AACvD,IAAI,IAAI,EAAE,4BAA4B;AACtC,IAAI,OAAO,EAAE,0DAA0D;AACvE,IAAI,kBAAkB,EAAE,sEAAsE;AAC9F,CAAC;AACW,MAAC,oCAAoC,GAAG,IAAI,SAAS,CAAC;AAClE,IAAI,IAAI,EAAE,oCAAoC;AAC9C,IAAI,OAAO,EAAE,2GAA2G;AACxH,IAAI,kBAAkB,EAAE,+DAA+D;AACvF,CAAC;AACW,MAAC,wBAAwB,GAAG;AAC5B,MAAC,sBAAsB,GAAG,IAAI,SAAS,CAAC;AACpD,IAAI,IAAI,EAAE,wBAAwB;AAClC,IAAI,OAAO,EAAE,uGAAuG;AACpH,IAAI,kBAAkB,EAAE,sDAAsD;AAC9E,CAAC;AACW,MAAC,uBAAuB,GAAG;AAC3B,MAAC,uBAAuB,GAAG;AAC3B,MAAC,yCAAyC,GAAG;;;;"}