This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import time
|
||||
from secrets import token_urlsafe
|
||||
from typing import Any, Callable, Optional
|
||||
from typing import Any, Callable
|
||||
|
||||
import orjson
|
||||
from authlib.integrations.starlette_client import OAuth
|
||||
@@ -395,7 +395,7 @@ async def store_oauth_state(state: str, data: dict) -> None:
|
||||
await redis.execute("SETEX", key, OAUTH_STATE_TTL, orjson.dumps(data))
|
||||
|
||||
|
||||
async def get_oauth_state(state: str) -> Optional[dict]:
|
||||
async def get_oauth_state(state: str) -> dict | None:
|
||||
"""Получает и удаляет OAuth состояние из Redis (one-time use)"""
|
||||
key = f"oauth_state:{state}"
|
||||
data = await redis.execute("GET", key)
|
||||
|
||||
Reference in New Issue
Block a user