robin_micek
01/15/2024, 9:55 PM@app.route(“/login”, methods=[“GET”, “POST”]
def page_login():
if request.method != “POST”:
return “””
<form method=“POST” action=“/login”>
<input type=“email” name=“email” id="email">
<input type=“password” name=“password” id="password">
<button type=“submit”>Login</button>
</form>
“””
else:
user = supertokens.do_login_logic(request.form[“email”], request.form[“password”]) # Plus it sets up all the session stuff, etc.
return f”UserID = {user.get_user_info()['userId']}”
I basically need to do the signup, login,... logic the middleware(app) does, but handling the requests/endpoints myself.
Is something like that possible? Any help would be appreciated.