Impersonate a user
This example shows you how to create a Smart Action "Impersonate" to login as one of your customers.
It can be useful to help your customers debug an issue or to get a better understanding of what they see on their account (in your app).

Requirements
An admin backend running on forest-express-sequelize/forest-express-mongoose
How it works
Directory: /models
This directory contains the users.js file where the model is declared.
Directory: /forest
This directory contains the users.js file where the Smart Action Impersonateis declared.
Directory: /routes
This directory contains the users.js file where the implementation of the route is handled. The POST /forest/actions/impersonate API call is triggered when you click on the Smart Action in the Forest UI.
Last updated
Was this helpful?