feat: revamp authentication -- remove twitch's tokens from our own wrapper token

This commit is contained in:
cătălin 2025-01-17 18:15:58 +01:00
commit 50900986fa
No known key found for this signature in database
31 changed files with 736 additions and 155 deletions

View file

@ -5,7 +5,7 @@ from caribou.migrate import Database as CaribouDatabase
from caribou.migrate import load_migrations
from src.huesoporro.infra.db import Database
from src.huesoporro.models import ChatbotSettings, TwitchAuth, User
from src.huesoporro.models import ChatbotSettings, User
from src.huesoporro.settings import Settings
from src.huesoporro.svc.backoff_service import BackoffService
from src.huesoporro.svc.is_mod import IsModSvc
@ -15,11 +15,10 @@ from src.huesoporro.svc.is_mod import IsModSvc
def user() -> User:
return User(
user="huesoporro",
expires_at=1671234567.0,
twitch_auth=TwitchAuth(
access_token="test_access_token", # noqa: S106
refresh_token="test_refresh_token", # noqa: S106
),
external_auth={
"twitch": {"token": "twitch_token"},
"discord": {"token": "discord_token"},
},
)