Spotix-API / backend /app /auth /oauth.py
Anish530's picture
Initial commit of full project [remaining backend some parts and frontend to be done yet]
aa27d2d
from authlib.integrations.starlette_client import OAuth
from starlette.config import Config
from app.core.config import settings
config = Config(environ={
"GOOGLE_CLIENT_ID": settings.GOOGLE_CLIENT_ID,
"GOOGLE_CLIENT_SECRET": settings.GOOGLE_CLIENT_SECRET
})
oauth = OAuth(config)
oauth.register(
name='google',
server_metadata_url='https://accounts.google.com/.well-known/openid-configuration',
client_kwargs={
'scope': 'openid email profile'
}
)