Skip to content

Instantly share code, notes, and snippets.

@leeyspaul
Last active Dec 7, 2021
Embed
What would you like to do?
Stytch Google OAuth
from flask import Flask
from flask import request
from flask import render_template
from flask import session
app = Flask(__name__)
app.secret_key = "development"
@app.route("/login")
def login():
"""Login a user."""
if "token" in request.url:
access_token = request.args.get("token")
session["token"] = access_token # TOOD: move to a DB in production, and do something safer and scaleable :)
return render_template('login.html')
@app.route("/sign-up")
def sign_up():
"""Placeholder sign up route for interacting with Stytch API."""
return "PLACEHOLDER"
if __name__ == "__main__":
app.run(port=8080, debug=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment