From 2c4d2a87a38737995a77ede0816113e22c8a6341 Mon Sep 17 00:00:00 2001 From: Levi Date: Wed, 27 Mar 2024 13:26:52 +0100 Subject: [PATCH] Add login key to cache after world login (#93) * Add login key to cache after world login * Set expiration time for login key --- houdini/handlers/login/world.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/houdini/handlers/login/world.py b/houdini/handlers/login/world.py index 961e3f7..38a3e9c 100644 --- a/houdini/handlers/login/world.py +++ b/houdini/handlers/login/world.py @@ -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)