fix: add missing function
Some checks failed
backend / docker (push) Failing after 10s

This commit is contained in:
kittentm 2026-06-23 06:50:34 +02:00
commit c4fe4f1bf1

View file

@ -1,9 +1,14 @@
import requests import requests
from config import settings from config import settings
from argon2 import PasswordHasher
API_URL = "https://account.spfn.net/api/v2" API_URL = "https://account.spfn.net/api/v2"
CLIENT_ID = "splatnet" CLIENT_ID = "splatnet"
CLIENT_SECRET = settings.account_client_secret CLIENT_SECRET = settings.account_client_secret
ph = PasswordHasher()
def hash_password(password: str):
return ph.hash(password)
def get_token(username, password): def get_token(username, password):
url = f"{API_URL}/oauth2/generate_token" url = f"{API_URL}/oauth2/generate_token"