remove /web prefix from the frontend_url variable

This commit is contained in:
maxDorninger
2025-11-29 15:54:01 +01:00
parent 9b0fac3a8b
commit bb5c61ac79
5 changed files with 10 additions and 6 deletions

View File

@@ -66,7 +66,7 @@ class UserManager(UUIDIDMixin, BaseUserManager[User, uuid.UUID]):
async def on_after_forgot_password(
self, user: User, token: str, request: Optional[Request] = None
):
link = f"{AllEncompassingConfig().misc.frontend_url}login/reset-password?token={token}"
link = f"{AllEncompassingConfig().misc.frontend_url}/web/login/reset-password?token={token}"
log.info(f"User {user.id} has forgot their password. Reset Link: {link}")
if not config.email_password_resets:
@@ -184,7 +184,7 @@ def get_jwt_strategy() -> JWTStrategy[models.UP, models.ID]:
class RedirectingCookieTransport(CookieTransport):
async def get_login_response(self, token: str) -> Response:
response = RedirectResponse(
str(AllEncompassingConfig().misc.frontend_url) + "dashboard",
str(AllEncompassingConfig().misc.frontend_url) + "/web/dashboard",
status_code=status.HTTP_302_FOUND,
)
return self._set_login_cookie(response, token)