Skip to main content

The users module identifies the user associated with the client’s current credentials.

Get The Current User#

getCurrentUser() returns the generated Phoenix API user union. Authenticated deployments return a local, OAuth 2, or LDAP user profile. When authentication is disabled, it returns { auth_method: "ANONYMOUS" }. Invalid credentials reject with an HttpError whose status is 401; other authorization failures retain their HTTP status as well.

Pass a client explicitly when you need custom configuration: