feat: Add environment configuration files and update settings for production and development
This commit is contained in:
@@ -70,7 +70,7 @@ class OAuthProvider(ABC):
|
||||
"""Generate authorization URL with state parameter."""
|
||||
# Construct provider-specific redirect URI
|
||||
redirect_uri = (
|
||||
f"http://localhost:8000/api/v1/auth/{self.provider_name}/callback"
|
||||
f"{settings.BACKEND_URL}/api/v1/auth/{self.provider_name}/callback"
|
||||
)
|
||||
|
||||
params = {
|
||||
@@ -86,7 +86,7 @@ class OAuthProvider(ABC):
|
||||
"""Exchange authorization code for access token."""
|
||||
# Construct provider-specific redirect URI (must match authorization request)
|
||||
redirect_uri = (
|
||||
f"http://localhost:8000/api/v1/auth/{self.provider_name}/callback"
|
||||
f"{settings.BACKEND_URL}/api/v1/auth/{self.provider_name}/callback"
|
||||
)
|
||||
|
||||
data = {
|
||||
@@ -150,7 +150,7 @@ class GoogleOAuthProvider(OAuthProvider):
|
||||
"""Exchange authorization code for access token."""
|
||||
# Construct provider-specific redirect URI (must match authorization request)
|
||||
redirect_uri = (
|
||||
f"http://localhost:8000/api/v1/auth/{self.provider_name}/callback"
|
||||
f"{settings.BACKEND_URL}/api/v1/auth/{self.provider_name}/callback"
|
||||
)
|
||||
|
||||
data = {
|
||||
|
||||
@@ -4,6 +4,7 @@ import logging
|
||||
|
||||
import socketio
|
||||
|
||||
from app.core.config import settings
|
||||
from app.utils.auth import JWTUtils
|
||||
from app.utils.cookies import extract_access_token_from_cookies
|
||||
|
||||
@@ -16,7 +17,7 @@ class SocketManager:
|
||||
def __init__(self) -> None:
|
||||
"""Initialize the SocketManager with a Socket.IO server."""
|
||||
self.sio = socketio.AsyncServer(
|
||||
cors_allowed_origins=["http://localhost:8001"],
|
||||
cors_allowed_origins=settings.CORS_ORIGINS,
|
||||
logger=True,
|
||||
engineio_logger=True,
|
||||
async_mode="asgi",
|
||||
|
||||
Reference in New Issue
Block a user