diff --git a/flask-facebok-google-twitter-login/README.md b/flask-facebok-google-twitter-login/README.md new file mode 100644 index 0000000..0f65bb6 --- /dev/null +++ b/flask-facebok-google-twitter-login/README.md @@ -0,0 +1,34 @@ +# Flask Oauth with major providers + +You can learn Flask OAuth client with this demo. + +## Install + +Install the required dependencies: + + $ pip install -U Flask Authlib requests + +## Config + +Google: + +Create your Google OAuth Client at , make sure to add `http://localhost:5000/google/auth/` into Authorized redirect URIs. + +Twitter: +Create your Twitter Oauth 1.0 Client at by creating a app. +Add `http://localhost:5000/twitter/auth/` into Authorized redirect URIs. + +Facebook: +Create your Facebook OAuth Client at , by creating a app. +Add `http://localhost:5000/facebook/auth/` into Authorized redirect URIs. + +Make sure you enter the key and secret for every provider in the app.py or use them as a environment variable +## Run + +Start server with: + +python app.py + +Then visit: + + http://localhost:5000/ diff --git a/flask-multiple-login/app.py b/flask-multiple-login/app.py index fc48bd6..65d708c 100644 --- a/flask-multiple-login/app.py +++ b/flask-multiple-login/app.py @@ -2,9 +2,8 @@ from flask import render_template, redirect, abort from authlib.integrations.flask_client import OAuth - app = Flask(__name__) -app.secret_key = '!secret' +app.secret_key = '\xfd{H\xe5<\x95\xf9\xe3\x96.5\xd1\x01Otwitter login google login +facebook login {% endif %}