My current token uses a forward and reverse encryption. The first time is to encrypt the user's ID and pass it to ios. Then every time he passes the encrypted value to me, I decrypt it again and use the decrypted ID. Then go to the database to query whether this user exists. Now I need to set the expiration time of a token. I would like to know how to set it. I wrote the interface under the framework of yii2. Or if the experts have some better ways to set the token, you can also enlighten me. Thank you very much
My current token uses a forward and reverse encryption. The first time is to encrypt the user's ID and pass it to ios. Then every time he passes the encrypted value to me, I decrypt it again and use the decrypted ID. Then go to the database to query whether this user exists. Now I need to set the expiration time of a token. I would like to know how to set it. I wrote the interface under the framework of yii2. Or if the experts have some better ways to set the token, you can also enlighten me. Thank you very much
Wouldn’t it be great if you asked iOS to encrypt the expiration time as well?