@@ -7,13 +7,13 @@ import {
77} from '@aws-amplify/core' ;
88import { assertTokenProviderConfig } from '@aws-amplify/core/internals/utils' ;
99
10+ import { AUTH_KEY_PREFIX } from '../tokenProvider/constants' ;
1011import { getAuthStorageKeys } from '../tokenProvider/TokenStore' ;
1112
1213import { OAuthStorageKeys , OAuthStore } from './types' ;
1314
1415const V5_HOSTED_UI_KEY = 'amplify-signin-with-hostedUI' ;
1516
16- const name = 'CognitoIdentityServiceProvider' ;
1717export class DefaultOAuthStore implements OAuthStore {
1818 keyValueStorage : KeyValueStorageInterface ;
1919 cognitoConfig ?: CognitoUserPoolConfig ;
@@ -26,7 +26,7 @@ export class DefaultOAuthStore implements OAuthStore {
2626 assertTokenProviderConfig ( this . cognitoConfig ) ;
2727
2828 const authKeys = createKeysForAuthStorage (
29- name ,
29+ AUTH_KEY_PREFIX ,
3030 this . cognitoConfig . userPoolClientId ,
3131 ) ;
3232 await Promise . all ( [
@@ -39,7 +39,7 @@ export class DefaultOAuthStore implements OAuthStore {
3939 async clearOAuthData ( ) : Promise < void > {
4040 assertTokenProviderConfig ( this . cognitoConfig ) ;
4141 const authKeys = createKeysForAuthStorage (
42- name ,
42+ AUTH_KEY_PREFIX ,
4343 this . cognitoConfig . userPoolClientId ,
4444 ) ;
4545 await this . clearOAuthInflightData ( ) ;
@@ -52,7 +52,7 @@ export class DefaultOAuthStore implements OAuthStore {
5252 assertTokenProviderConfig ( this . cognitoConfig ) ;
5353
5454 const authKeys = createKeysForAuthStorage (
55- name ,
55+ AUTH_KEY_PREFIX ,
5656 this . cognitoConfig . userPoolClientId ,
5757 ) ;
5858
@@ -63,7 +63,7 @@ export class DefaultOAuthStore implements OAuthStore {
6363 assertTokenProviderConfig ( this . cognitoConfig ) ;
6464
6565 const authKeys = createKeysForAuthStorage (
66- name ,
66+ AUTH_KEY_PREFIX ,
6767 this . cognitoConfig . userPoolClientId ,
6868 ) ;
6969
@@ -74,7 +74,7 @@ export class DefaultOAuthStore implements OAuthStore {
7474 assertTokenProviderConfig ( this . cognitoConfig ) ;
7575
7676 const authKeys = createKeysForAuthStorage (
77- name ,
77+ AUTH_KEY_PREFIX ,
7878 this . cognitoConfig . userPoolClientId ,
7979 ) ;
8080
@@ -85,7 +85,7 @@ export class DefaultOAuthStore implements OAuthStore {
8585 assertTokenProviderConfig ( this . cognitoConfig ) ;
8686
8787 const authKeys = createKeysForAuthStorage (
88- name ,
88+ AUTH_KEY_PREFIX ,
8989 this . cognitoConfig . userPoolClientId ,
9090 ) ;
9191
@@ -100,7 +100,7 @@ export class DefaultOAuthStore implements OAuthStore {
100100 assertTokenProviderConfig ( this . cognitoConfig ) ;
101101
102102 const authKeys = createKeysForAuthStorage (
103- name ,
103+ AUTH_KEY_PREFIX ,
104104 this . cognitoConfig . userPoolClientId ,
105105 ) ;
106106
@@ -112,7 +112,7 @@ export class DefaultOAuthStore implements OAuthStore {
112112 async storeOAuthInFlight ( inflight : boolean ) : Promise < void > {
113113 assertTokenProviderConfig ( this . cognitoConfig ) ;
114114 const authKeys = createKeysForAuthStorage (
115- name ,
115+ AUTH_KEY_PREFIX ,
116116 this . cognitoConfig . userPoolClientId ,
117117 ) ;
118118
@@ -126,7 +126,7 @@ export class DefaultOAuthStore implements OAuthStore {
126126 assertTokenProviderConfig ( this . cognitoConfig ) ;
127127
128128 const authKeys = createKeysForAuthStorage (
129- name ,
129+ AUTH_KEY_PREFIX ,
130130 this . cognitoConfig . userPoolClientId ,
131131 ) ;
132132
@@ -151,7 +151,7 @@ export class DefaultOAuthStore implements OAuthStore {
151151 assertTokenProviderConfig ( this . cognitoConfig ) ;
152152
153153 const authKeys = createKeysForAuthStorage (
154- name ,
154+ AUTH_KEY_PREFIX ,
155155 this . cognitoConfig . userPoolClientId ,
156156 ) ;
157157
0 commit comments