@aws-amplify/auth
Version:
Auth category of aws-amplify
19 lines (16 loc) • 727 B
JavaScript
import { clearCredentials, Hub } from '@aws-amplify/core';
import { AMPLIFY_SYMBOL } from '@aws-amplify/core/internals/utils';
import '../refreshAuthTokens.mjs';
import '../../tokenProvider/errorHelpers.mjs';
import '../types.mjs';
import { tokenOrchestrator } from '../../tokenProvider/tokenProvider.mjs';
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
const completeOAuthSignOut = async (store) => {
await store.clearOAuthData();
tokenOrchestrator.clearTokens();
await clearCredentials();
Hub.dispatch('auth', { event: 'signedOut' }, 'Auth', AMPLIFY_SYMBOL);
};
export { completeOAuthSignOut };
//# sourceMappingURL=completeOAuthSignOut.mjs.map