Add login key to cache after world login (#93)

* Add login key to cache after world login

* Set expiration time for login key
This commit is contained in:
Levi 2024-03-27 13:26:52 +01:00 committed by GitHub
parent 2af6216cbb
commit 2c4d2a87a3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -62,6 +62,10 @@ async def handle_login(p, credentials: WorldCredentials):
data = await Penguin.get(credentials.id)
p.login_key = login_key
# Store login key in redis for use in other services
await p.server.redis.setex(f'{data.username}.loginkey', 60 * 60 * 12, login_key)
await world_login(p, data)