furaiev / amazon-cognito-identity-dart-2

Unofficial Amazon Cognito Identity Provider Dart SDK, to easily add user sign-up and sign-in to your mobile and web apps with AWS.
MIT License
187 stars 114 forks source link

Login by token #84

Closed newdev8 closed 3 years ago

newdev8 commented 4 years ago

So In my app, the user logs in through a WebView and then, it passes the tokens (IdToken, AccessToken and RefreshToken) and the username to the client. As seen In this plugin, on login, it writes some key values:

CognitoIdentityServiceProvider.[appId].[username].idToken CognitoIdentityServiceProvider.[appId].[username].accessToken CognitoIdentityServiceProvider.[appId].[username].refreshToken CognitoIdentityServiceProvider.[appId].[username].clockDrift CognitoIdentityServiceProvider.[appId].LastAuthUser

I managed to save those values manually, but when calling _userService.checkAuthenticated() the plugin returns false.

Is there any way to manually input the tokens? Thanks in advance.

furaiev commented 4 years ago

It isn't currently supported. You are welcome to create a method that will manage the outside tokens and create a PR.