简体   繁体   中英

Revoke all refresh tokens of all users. Cognito

I have developed an IOS app, and I am using cognito for authentication. And the refresh token's expiry time is 1 year. But unfortunately we need all the users to re-login in app and we need to forcefully logout(revoke refresh token) every user from cognito, not only one or two users but all users form all devices. I have researched a little bit and find that this can be done by revoking refresh token(of single user) but I can't find a solution where we can logout all users from all devices.

There is currently no such option to revoke all existing tokens.

All you can do is to iterate over each and every user and revoke tokens using the AdminUserGlobalSignOut API. You only need a username and a user pool ID to do it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM