Last active
November 30, 2021 17:57
-
-
Save leeyspaul/0ef4716e49cf011eb7fc872348ca81da to your computer and use it in GitHub Desktop.
OAuth2 Google Calendar API Authorize Route
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# create our Flask web app | |
app = Flask(__name__) | |
# this allows transport over HTTP for development purposes, if excluded | |
# HTTPS is needed | |
os.environ['OAUTHLIB_INSECURE_TRANSPORT'] = '1' | |
@app.route("/authorize-user") | |
def auth_user(): | |
""" | |
Redirects a user to Google's authorization server to show the OAuth | |
Consent screen and get user consent. | |
""" | |
return redirect(authorization_url) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment