To protect certain routes in the frontend we need to now the given user permissions only by the current request.
The request only contains the bearer token, so for middleware we need an api endpoint that allows us to fetch user data with the given token.
I suggest implementing /users/current that returns the user for the given Authorization header.
To protect certain routes in the frontend we need to now the given user permissions only by the current request.
The request only contains the bearer token, so for middleware we need an api endpoint that allows us to fetch user data with the given token.
I suggest implementing `/users/current` that returns the user for the given Authorization header.
ahtlon
was assigned by kalipso2026-06-22 14:53:08 +02:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
To protect certain routes in the frontend we need to now the given user permissions only by the current request.
The request only contains the bearer token, so for middleware we need an api endpoint that allows us to fetch user data with the given token.
I suggest implementing
/users/currentthat returns the user for the given Authorization header.