entidi2608 commited on
Commit
421b227
·
1 Parent(s): 220889e

new update

Browse files
Files changed (2) hide show
  1. main.py +1 -0
  2. routers/user.py +1 -1
main.py CHANGED
@@ -63,6 +63,7 @@ app = FastAPI(
63
  version="2.0",
64
  description="Backend API cho Trợ lý Pháp luật JuriBot",
65
  lifespan=lifespan,
 
66
  docs_url="/api/docs", # Đặt đường dẫn cho Swagger UI
67
  redoc_url="/api/redoc", # Đặt đường dẫn cho ReDoc UI
68
  )
 
63
  version="2.0",
64
  description="Backend API cho Trợ lý Pháp luật JuriBot",
65
  lifespan=lifespan,
66
+ proxy_headers=True,
67
  docs_url="/api/docs", # Đặt đường dẫn cho Swagger UI
68
  redoc_url="/api/redoc", # Đặt đường dẫn cho ReDoc UI
69
  )
routers/user.py CHANGED
@@ -276,7 +276,7 @@ async def login_via_google(request: Request):
276
  Nó sẽ chuyển hướng người dùng đến trang đăng nhập của Google.
277
  """
278
  try:
279
- redirect_uri = request.url_for('auth_google_callback')
280
  return await oauth.google.authorize_redirect(request, redirect_uri)
281
  except Exception as e:
282
  logger.error(f"Error initiating Google login: {e}")
 
276
  Nó sẽ chuyển hướng người dùng đến trang đăng nhập của Google.
277
  """
278
  try:
279
+ redirect_uri = "https://entidi2608-juribot-backend.hf.space/api/user/google/callback"
280
  return await oauth.google.authorize_redirect(request, redirect_uri)
281
  except Exception as e:
282
  logger.error(f"Error initiating Google login: {e}")