@accounts/server to your app with yarn or npm:
@accounts/server module exposes a set of methods that can be used directly in your server code.
Find a user
Find a user by his id.
Login a user manually
Creating a new session for a user
⚠️ This method creates a session without authenticating any user identity. Any authentication should happen before calling this function.
Deactivate a user
Deactivate a user, the user will not be able to login until his account is reactivated.
Activate a user
Activate a user. Use this method to unblock a user account that was previously deactivated.
Logout a user
Logout a user and invalidate his session with the session access token.
Customising the JWT payload
When creating the JWT accessToken, accounts-js will add the following properties:
isImpersonated. If you want to add your own data to the payload (eg: roles or other), you can do it using the