#✅ - Custom Claims in v6
3 messages · Page 1 of 1 (latest)
3 messages · Page 1 of 1 (latest)
We are using custom claims in our v5 Amplify app. The custom claims are dynamic groups a user is part of. When the user joins a new group we trigger a token refresh in the client, which in turn updates their custom claim. In v6 we have not found a way to trigger a token refresh. Is there a solution to this?
In case anyone else is struggling with this, we found out by now this is the new way to refresh a session.
import { fetchAuthSession } from 'aws-amplify/auth';
await fetchAuthSession({ forceRefresh: true });
✅ - Custom Claims in v6