aboutsummaryrefslogtreecommitdiff
path: root/app/__init__.py
diff options
context:
space:
mode:
authorNavan Chauhan <navanchauhan@gmail.com>2021-06-05 17:34:08 +0530
committerNavan Chauhan <navanchauhan@gmail.com>2021-06-05 17:34:08 +0530
commitd656c5601e9bf01e9d8c8fe43c867ec4044d9e69 (patch)
tree6ff3a9ec6fd1041f1cb77912a967a7430c2302d8 /app/__init__.py
parent759a59d3066abcbfe8f2523044b4477a02090c03 (diff)
added sign in with google
Diffstat (limited to 'app/__init__.py')
-rw-r--r--app/__init__.py8
1 files changed, 8 insertions, 0 deletions
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)