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 authlib.integrations.starlette_client import OAuth
import httpx
import httpx, os
SECRET_KEY = "09d25e094faa6ca2556c818166b7a9563b93f7099f6f0f4caa6cf63b88e8d3e7"
ALGORITHM = "HS256"
@ -22,8 +22,8 @@ pwd_context = CryptContext(schemes=["bcrypt"], deprecated="auto")
oauth = OAuth()
oauth.register(
name="google",
client_id="GOOGLE_CLIENT_ID",
client_secret="GOOGLE_CLIENT_SECRET",
client_id=os.environ["GOOGLE_CLIENT_ID"],
client_secret=os.environ["GOOGLE_CLIENT_SECRET"],
authorize_url="https://accounts.google.com/o/oauth2/auth",
access_token_url="https://oauth2.googleapis.com/token",
client_kwargs={"scope": "openid email profile"},

View File

@ -7,3 +7,4 @@ python-multipart
fastapi-mail
redis
authlib
httpx