Spaces:
Running

axeronis commited on
Commit
372bfd3
·
1 Parent(s): 4d757a2

fix: use production URL for OAuth redirect

Browse files
Files changed (1) hide show
  1. backend/app/api/oauth.py +3 -1
backend/app/api/oauth.py CHANGED
@@ -26,7 +26,9 @@ router = APIRouter(prefix="/oauth", tags=["OAuth"])
26
  # TODO: Set these in environment variables
27
  META_APP_ID = settings.META_APP_ID if hasattr(settings, 'META_APP_ID') else None
28
  META_APP_SECRET = settings.META_APP_SECRET if hasattr(settings, 'META_APP_SECRET') else None
29
- META_REDIRECT_URI = f"{settings.FRONTEND_URL}/channels" # Redirect back to channels page
 
 
30
 
31
 
32
  # ==================== SCHEMAS ====================
 
26
  # TODO: Set these in environment variables
27
  META_APP_ID = settings.META_APP_ID if hasattr(settings, 'META_APP_ID') else None
28
  META_APP_SECRET = settings.META_APP_SECRET if hasattr(settings, 'META_APP_SECRET') else None
29
+ # Use production URL for redirect (avoid localhost in production)
30
+ _frontend_url = settings.FRONTEND_URL if settings.FRONTEND_URL and 'localhost' not in settings.FRONTEND_URL else 'https://microfunnel.online'
31
+ META_REDIRECT_URI = f"{_frontend_url}/channels" # Redirect back to channels page
32
 
33
 
34
  # ==================== SCHEMAS ====================