feature/oauth #54

Merged
v4l3n71n merged 3 commits from feature/oauth into master 2025-03-01 20:49:13 +00:00
2 changed files with 5 additions and 4 deletions
Showing only changes of commit a094b56d44 - Show all commits

View File

@ -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"},

View File

@ -6,4 +6,5 @@ passlib[bcrypt]
python-multipart python-multipart
fastapi-mail fastapi-mail
redis redis
authlib authlib
httpx