Amplify-js: "No current user" when trying to sign in

Created on 11 May 2019  路  1Comment  路  Source: aws-amplify/amplify-js

Describe the bug

Trying to sign in, using Auth.signIn(username, password), and get the error message "No current user".

Checking the network tab shows a 200 POST https://cognito-idp.us-east-1.amazonaws.com/ request, with what seems to be a valid user response:

{"AuthenticationResult":{"AccessToken":".....","RefreshToken":"...","TokenType":"Bearer"},"ChallengeParameters":{}}

Configuring with:

Amplify.configure({
    Auth: {
        region: 'us-east-1',
        userPoolId: process.env.userPoolId,
        userPoolWebClientId: process.env.userPoolWebClientId,
        mandatorySignIn: true,
        cookieStorage,
    },
});

I'm somewhat sure that the ids are correct, but im not sure if im missing anything else

Most helpful comment

Issue was due to using http://localhost:3000, and the default of cookieStorage.secure being true.

>All comments

Issue was due to using http://localhost:3000, and the default of cookieStorage.secure being true.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ldgarcia picture ldgarcia  路  3Comments

ddemoll picture ddemoll  路  3Comments

shinnapatthesix picture shinnapatthesix  路  3Comments

benevolentprof picture benevolentprof  路  3Comments

romainquellec picture romainquellec  路  3Comments