Skip to content

πŸ“š The open-source, offline-first Notion, Obsidian & Confluence alternative. Advanced Markdown, multi-tenant teams, OIDC/SSO, and local S3 backups. Deploy in one command.

Fix Unauthorized message to discunnect users in frontend app when JWT is invalid

Smaug67390b194956738d
diff --git a/backend/middlewares/authentification.go b/backend/middlewares/authentification.go
index 2ffd8d0f..658556c0 100644
--- a/backend/middlewares/authentification.go
+++ b/backend/middlewares/authentification.go
@@ -31,7 +31,7 @@ func Auth() gin.HandlerFunc {
})
if err != nil || !token.Valid {
- c.JSON(http.StatusUnauthorized, utils.Error("Unauthorized"))
+ c.JSON(http.StatusUnauthorized, utils.Error("Bad access token."))
c.Abort() // Stop further processing if unauthorized
return
}