From d656c5601e9bf01e9d8c8fe43c867ec4044d9e69 Mon Sep 17 00:00:00 2001 From: Navan Chauhan Date: Sat, 5 Jun 2021 17:34:08 +0530 Subject: added sign in with google --- app/__init__.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'app/__init__.py') diff --git a/app/__init__.py b/app/__init__.py index 9f025af..b006c8f 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -5,12 +5,20 @@ from flask.cli import AppGroup from flask_sqlalchemy import SQLAlchemy import flask_login +from authlib.integrations.flask_client import OAuth + app = Flask(__name__) app.config.from_object('app.config') bcrypt = Bcrypt(app) db = SQLAlchemy(app) login_manager = flask_login.LoginManager() +oauth = OAuth(app) + +oauth.register( + name="google", + server_metadata_url="https://accounts.google.com/.well-known/openid-configuration", + client_kwargs={"scope": "openid email profile"}) login_manager.init_app(app) -- cgit v1.2.3