Added /users/me route, and handling auth in frontend

This commit is contained in:
cdricms
2025-01-17 15:37:01 +01:00
parent 5405cc50d9
commit eb9883a1c3
20 changed files with 453 additions and 68 deletions

View File

@@ -135,8 +135,10 @@ func AuthJWT(next http.Handler) http.Handler {
return
}
ctx := context.WithValue(r.Context(), "token", token)
// Call the next handler if the JWT is valid
next.ServeHTTP(w, r)
next.ServeHTTP(w, r.WithContext(ctx))
})
}