Flarum Identity Agent
A simple extension that allows you to switch users quickly and seamlessly.
Modified from FoF Real-time Login.
composer require dalez/flarum-identityagent
Usage
Users with usage rights will see a "User" icon on the top bar. Just click the icon and enter the username and password as usual in the subsequent dialog box that similar to the login dialog to switch to the corresponding account.
After switching, the "User" icon will have a gear, indicating that the agent has started - any activity will theoretically be carried out in the identity of the switched account. Click this icon again, and you can return to the previous account.
Purpose
The use of this extension may not be common.
Suppose you are an employee of a bakery. You have a personal account in the bakery community, you can interact with people in your personal identity, share your views on products, and answer customer questions about products. There is also an official account of the bakery in the community. You and some other employees are asked to post new products, promotions, and event information to people in the official identity of the bakery through the official account. When switching frequently between personal and official account, using the traditional method of logging out and then logging in may be troublesome, because at least two page reloads are required during this period. Therefore, this extension makes the steps required to switch accounts less, and no page reload is required, which can reduce the time consumed.
Differences from existing similar projects
- FoF Real-time Login:
It is only available when not logged in. The implementation principle of this extension is also different from it.
- FoF Impersonate:
It can log in to any account without knowing the password when you has permissions, and it can keep the login status. This extension still needs the password to ensure that the switcher has legal access to the account. With Identity Agent, it is easier to return to the original account. The switching state is based on a single session. You can seamlessly return to the original account by simply clicking, or you can do this by refreshing the page.
Note
- If you enter incorrect information or encounter other errors, the login button will not return to a clickable state. Please close the dialog box and reopen it to allow you to start again.
- The availability of this extension has not been widely verified - it may not be used with other login-related extensions, and some operations may not be performed in the switched identity state. If you encounter problems, please use the traditional method of switching users.
Links
Github
Packagist