Files
hnsau/account.py
Nathan Woodburn f5f4addd74
All checks were successful
Build Docker / Build Image (push) Successful in 21s
feat: Add promo codes
2024-02-15 11:58:26 +11:00

22 lines
421 B
Python

import os
import dotenv
import random
dotenv.load_dotenv()
EMAIL = os.getenv('LOGIN_EMAIL')
PASSWORD = os.getenv('LOGIN_PASSWORD')
tokens = []
def login(email, password):
if email == EMAIL and password == PASSWORD:
token = str(random.randint(100000, 999999))
tokens.append(token)
return token
return False
def token(token):
if token in tokens:
return True
return False