How can I refresh id token manually?
See original GitHub issueI want to update the user attribute and get a new token with updated params. I need it updated since our server takes some params from it.
How can I refresh the token so it will contain updated params? Also, I’m not sure should this token be refreshed automatically after parameter update?
Found similar issue in the AWS SDK: https://github.com/aws-amplify/aws-sdk-android/issues/696. It has a SharedPreferences
workaround. Not sure if it will work with Amplify? What exact prefs do I need to clear? Thanks.
Amplify Auth version: 1.4.1
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:11 (7 by maintainers)
Top Results From Across the Web
Refresh the access and ID tokens | Okta Developer
This guide shows you how to refresh access and ID tokens by using either the Identity Engine SDK or the OIDC & OAuth...
Read more >What Are Refresh Tokens and How to Use Them Securely
This post will explore the concept of refresh tokens as defined by OAuth 2.0. We will learn how they compare to other token...
Read more >Using the refresh token - Amazon Cognito - AWS Documentation
If the refresh token is expired, your app user must re-authenticate by signing in again to your user pool. If the minimum for...
Read more >Refresh Tokens — IdentityServer4 1.0.0 documentation
You can request a refresh token by adding a scope called offline_access to the scope parameter. Requesting an access token using a refresh...
Read more >Microsoft identity platform refresh tokens
The refresh token is used to obtain new access/refresh token pairs when the current access token expires. Refresh tokens are also used to ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Sorry guys, you’re correct - that does not achieve what you’re looking for and I see this is still a pending feature request for AWSMobileClient which Amplify Auth is currently based on. You can add your +1s there as well to help get it prioritized and reopened this so others can add +1s to this.
To extend @chinalwb 's great answer, here’s the code that works in 1.18.0:
But please for the sake of anything you cherish use it as last resort.