terminate user session and their cookies

Hi , I want to terminate all user login with one user_name together if the users see the current sessions and click in terminating all , all of them are log out like telegram . now I save sessions in db with user_id and show to user with sessions are online with your username , I know , I must change auth_key after delete session but It’s have one problem , in this case all users have cookie with one auth_key if I change auth_key all user and the current user log out , at the first I think about another table for auth_key and save auth_key with user_id in it when the user want to log in on the site , but I don’t know how set auth_key foreach user and create cookie _identity for it in each login

please help at this situation , and send your mind and the sultion this.

Try doing the following: log identity out, erase auth key, log identity in again.

thanks for your suggestion, but how can separate "auth_key" for each user? which method do I override it? and how?

because I want to terminate one of them

Well, select a user by email or username or something else, set its auth key to new value. Save.

yes but the scenario of this, I think at the login we must set "_identity" cookie and save new record for the user

Is it true?

which method I must override in "yii/web/User" for do this?