UNPKG

@aws-amplify/auth

Version:
18 lines (15 loc) 605 B
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 import { authErrorMessages } from '../../../../Errors'; import { AuthErrorCodes } from '../../../../common/AuthErrorStrings'; import { AuthError } from '../../../../errors/AuthError'; export const createOAuthError = ( message: string, recoverySuggestion?: string, ) => new AuthError({ message: message ?? 'An error has occurred during the oauth process.', name: AuthErrorCodes.OAuthSignInError, recoverySuggestion: recoverySuggestion ?? authErrorMessages.oauthSignInError.log, });