feat: add root redirection
This commit is contained in:
parent
ae4f0ce925
commit
1f99463414
9
app.py
9
app.py
@ -27,7 +27,8 @@ client = LinkedRolesOAuth2(
|
|||||||
scopes=("identify", "role_connections.write"),
|
scopes=("identify", "role_connections.write"),
|
||||||
state=os.getenv("COOKIE_SECRET")
|
state=os.getenv("COOKIE_SECRET")
|
||||||
)
|
)
|
||||||
fn = Fernet(os.getenv("ENCRYPT_KEY"))
|
key = Fernet.generate_key()
|
||||||
|
fn = Fernet(key)
|
||||||
|
|
||||||
def encrypt(text: str) -> str:
|
def encrypt(text: str) -> str:
|
||||||
return fn.encrypt(text.encode())
|
return fn.encrypt(text.encode())
|
||||||
@ -48,7 +49,11 @@ async def startup():
|
|||||||
async def shutdown():
|
async def shutdown():
|
||||||
await client.close()
|
await client.close()
|
||||||
|
|
||||||
@app.get('/verify')
|
@app.get("/")
|
||||||
|
async def root():
|
||||||
|
return RedirectResponse(url="https://github.com/CloudToys/Achievement-Promotion")
|
||||||
|
|
||||||
|
@app.get("/verify")
|
||||||
async def link():
|
async def link():
|
||||||
steam_openid_url = "https://steamcommunity.com/openid/login"
|
steam_openid_url = "https://steamcommunity.com/openid/login"
|
||||||
u = {
|
u = {
|
||||||
|
Reference in New Issue
Block a user