Closed derohimat closed 1 year ago
@derohimat I don't think AWS API allows it. At least JS lib doesn't allow - https://github.com/aws-amplify/amplify-js/blob/main/packages/amazon-cognito-identity-js/src/CognitoUser.js#L1386
Solved, just put empty username and put refresh token here.
Example
final cognitoUser = CognitoUser('', Config.userPool);
final cognitoRefreshToken = CognitoRefreshToken(refreshToken);
final newSession = await cognitoUser.refreshSession(cognitoRefreshToken);
In my case, I want to integrate a deeplink for login with refreshToken value.
For example https://example.com/login?refreshToken=XYZ
And is it possible to send empty username into
CognitoUser
class ?I have try but get this error.