currentUser()
The currentUser
helper returns the Backend User
object of the currently active user. It can be used in Server Components, Route Handlers, and Server Actions.
Under the hood, this helper:
- calls
fetch()
, so it is automatically deduped per request. - uses the
GET /v1/users/{user_id}
endpoint. - counts towards the Backend API request rate limit.
Feedback
Last updated on