Aws Ampify Cognito Session Persistance

0

Hi the cognito session is not getting persisted below is my auth configuration Amplify.configure({ Auth: { mandatorySignIn: true, userPoolId: 'adasdadasdada', userPoolWebClientId: 'tesstt', storage:localStorage, oauth: { domain: 'spring-auth-oro.auth.ap-south-1.amazoncognito.com', scope: ['email', 'aws.cognito.signin.user.admin', 'openid'], redirectSignIn: 'http://localhost:8080', redirectSignOut: 'http://localhost:8080', region: 'ap-south-1', responseType: 'code' } } });

1개 답변
0

Hello,

I understand that you want to achieve persistence with Amplify Cognito session. As per the shared Amplify.configure(), there are few configuration issues such as the region is being passed into the incorrect location, and by default, Amplify uses the local storage already, so there is no need to define that.

We need additional information to troubleshoot this issue, and some information are account-specific, which cannot be shared publicly. If you have AWS support plan, kindly open a support case with AWS using the following link.

In support case, please include following additional information:

  • What does lack of "persistence" mean here? Is the user receiving tokens? If yes, do they see the tokens stored within the local storage of the browser?
  • How long are the tokens set to live for, when configuring the Auth resource?
  • Do you see any errors, after setting set window.LOG_LEVEL = 'DEBUG';, as described here, around the time the user signs in, as well as when the tokens are expected to be refreshed.
  • How are you defining the localStorage object?
  • How is the user signing into the application? Is it the Authenticator module, or the SDK methods? What function is used from the Amplify SDK?
  • What is the version of SDK?
AWS
지원 엔지니어
Isha_K
답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인