Created
May 12, 2023 10:25
-
-
Save salihgueler/8d8b7a725f18d02a4baa1d9a6634efc6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final session = await Amplify.Auth.fetchAuthSession() as CognitoAuthSession; | |
final userTokenResult = session.userPoolTokensResult.type; | |
switch (userTokenResult) { | |
case AuthSuccessResult(value: final tokens): | |
safePrint('Successfully fetched the tokens: $tokens'); | |
case AuthErrorResult(:final exception): | |
safePrint('Failed to fetch the tokens: $exception'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment