login($username, $password); if (!$token) { throw new PlatformAuthException(PlatformEnum::LEMMY, 'Login failed'); } Cache::put('lemmy_jwt_token', $token, 3600); return $token; } }