{"id":21667709,"url":"https://github.com/alan2207/epic-stack-with-user-impersonation","last_synced_at":"2025-04-12T01:42:02.421Z","repository":{"id":179447245,"uuid":"662904200","full_name":"alan2207/epic-stack-with-user-impersonation","owner":"alan2207","description":"An example Remix application showcasing how to implement user impersonation in the Epic Stack.","archived":false,"fork":false,"pushed_at":"2023-07-07T16:20:51.000Z","size":10552,"stargazers_count":36,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-25T21:22:16.696Z","etag":null,"topics":["epic-stack","epic-stack-example","remix","user-impersonate"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alan2207.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-07-06T06:24:41.000Z","updated_at":"2024-11-24T12:38:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"59d31113-19dd-4157-b934-9f1f9ef87eed","html_url":"https://github.com/alan2207/epic-stack-with-user-impersonation","commit_stats":null,"previous_names":["alan2207/epic-stack-with-user-impersonation"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alan2207%2Fepic-stack-with-user-impersonation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alan2207%2Fepic-stack-with-user-impersonation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alan2207%2Fepic-stack-with-user-impersonation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alan2207%2Fepic-stack-with-user-impersonation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alan2207","download_url":"https://codeload.github.com/alan2207/epic-stack-with-user-impersonation/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248505761,"owners_count":21115353,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["epic-stack","epic-stack-example","remix","user-impersonate"],"created_at":"2024-11-25T11:46:30.395Z","updated_at":"2025-04-12T01:42:02.414Z","avatar_url":"https://github.com/alan2207.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Epic Stack with User Impersonation\n\nUser impersonation is a feature that allows admin users to log in as any other\nuser without knowing their password. This is useful for troubleshooting issues\nthat a user may be experiencing.\n\nThis example demonstrates how to implement this feature in an Epic Stack application.\n\n## Demo:\n\n![Demo](./demo.gif)\n\n## How it works\n\nWhen an admin user wants to impersonate another user, we need to:\n\n- Get the current session ID from the cookie and store it in the session as\n  `impersonatorSessionId`\n- Create a new session for the user we want to impersonate and store it in the\n  cookie as `sessionId`\n\nWhen the user stops impersonating, we need to:\n\n- Take the session ID stored in `impersonatorSessionId` and assign it to\n  `sessionId`, which will restore the original admin session.\n- Clear `impersonatorSessionId` from the cookie\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falan2207%2Fepic-stack-with-user-impersonation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falan2207%2Fepic-stack-with-user-impersonation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falan2207%2Fepic-stack-with-user-impersonation/lists"}