diff --git a/auth/auth0/middleware.go b/auth/auth0/middleware.go index 1cde349..5b1e708 100644 --- a/auth/auth0/middleware.go +++ b/auth/auth0/middleware.go @@ -33,6 +33,6 @@ func authenticatedMiddleware(deps *deps, next http.Handler) http.Handler { }) } -func CurrentUser(r *http.Request) any { - return r.Context().Value(userContextKey{}) +func CurrentUser(r *http.Request) SessionUser { + return r.Context().Value(userContextKey{}).(SessionUser) }