feature/oauth #54
@ -11,7 +11,7 @@ from ..models import users, token
|
|||||||
from ..dependencies import database, cookie
|
from ..dependencies import database, cookie
|
||||||
|
|
||||||
from authlib.integrations.starlette_client import OAuth
|
from authlib.integrations.starlette_client import OAuth
|
||||||
import httpx
|
import httpx, os
|
||||||
|
|
||||||
SECRET_KEY = "09d25e094faa6ca2556c818166b7a9563b93f7099f6f0f4caa6cf63b88e8d3e7"
|
SECRET_KEY = "09d25e094faa6ca2556c818166b7a9563b93f7099f6f0f4caa6cf63b88e8d3e7"
|
||||||
ALGORITHM = "HS256"
|
ALGORITHM = "HS256"
|
||||||
@ -22,8 +22,8 @@ pwd_context = CryptContext(schemes=["bcrypt"], deprecated="auto")
|
|||||||
oauth = OAuth()
|
oauth = OAuth()
|
||||||
oauth.register(
|
oauth.register(
|
||||||
name="google",
|
name="google",
|
||||||
client_id="GOOGLE_CLIENT_ID",
|
client_id=os.environ["GOOGLE_CLIENT_ID"],
|
||||||
client_secret="GOOGLE_CLIENT_SECRET",
|
client_secret=os.environ["GOOGLE_CLIENT_SECRET"],
|
||||||
authorize_url="https://accounts.google.com/o/oauth2/auth",
|
authorize_url="https://accounts.google.com/o/oauth2/auth",
|
||||||
access_token_url="https://oauth2.googleapis.com/token",
|
access_token_url="https://oauth2.googleapis.com/token",
|
||||||
client_kwargs={"scope": "openid email profile"},
|
client_kwargs={"scope": "openid email profile"},
|
||||||
|
@ -6,4 +6,5 @@ passlib[bcrypt]
|
|||||||
python-multipart
|
python-multipart
|
||||||
fastapi-mail
|
fastapi-mail
|
||||||
redis
|
redis
|
||||||
authlib
|
authlib
|
||||||
|
httpx
|
Loading…
x
Reference in New Issue
Block a user