Admin Plugin suggestions: stopImpersonating() and editUser() #189

Closed
opened 2026-03-13 07:36:55 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @lucaslevin on GitHub (Nov 6, 2024).

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

I think it would be a good idea to have admin.stopImpersonating() so admin don't have to logout of impersonated user (or wait for session to end). Also an admin.editUser() as a way of editing a users information.

Describe the solution you'd like
A clear and concise description of what you want to happen.

There is already the impersonatedBy (id) in the useSession(), so it could just be a switch back.

For user edit, it could just use a similar structure as the user.updateUser() but for Admins.

Originally created by @lucaslevin on GitHub (Nov 6, 2024). **Is your feature request related to a problem? Please describe.** A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] I think it would be a good idea to have admin.stopImpersonating() so admin don't have to logout of impersonated user (or wait for session to end). Also an admin.editUser() as a way of editing a users information. **Describe the solution you'd like** A clear and concise description of what you want to happen. There is already the impersonatedBy (id) in the useSession(), so it could just be a switch back. For user edit, it could just use a similar structure as the user.updateUser() but for Admins.
Author
Owner

@Kevinvincentals commented on GitHub (Nov 12, 2024):

What I did was save the admin session in a cookie called admin_session
Then after impersonation - It switches around the session cookies and you are back.
Logic like this should be implemented. +1

@Kevinvincentals commented on GitHub (Nov 12, 2024): What I did was save the admin session in a cookie called admin_session Then after impersonation - It switches around the session cookies and you are back. Logic like this should be implemented. +1
Author
Owner

@zawasp commented on GitHub (Jan 22, 2025):

It seems "edit user" was not implemented @Bekacru

@zawasp commented on GitHub (Jan 22, 2025): It seems "edit user" was not implemented @Bekacru
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#189