Overview
The Login Token feature is a seamless solution for user authentication that automatically logs in users when a valid and unexpired single-use authToken is included in the URL. This functionality provides a straightforward mechanism for accessing accounts through email and SMS notifications, streamlining the login process and enhancing user experience. It’s important for developers to use this feature responsibly, as it comes with its own set of risks.
Features
- Automatic Login: Users are automatically logged in if a valid authToken is present in the URL, making the process quick and efficient.
- Single-Use Tokens: Each authToken is single-use, adding an extra layer of security by preventing reuse after the initial login.
- Error Handling: The LoginToken object emits error events, allowing developers to manage authentication failures gracefully.
- Event Callbacks: Supports various events such as error notifications and successful logins, enabling developers to trigger specific actions based on the authentication results.
- Client and Server Compatibility: Functions smoothly on both client and server sides, ensuring seamless integration into different application architectures.
- User ID Returns: Successful login events provide the userId, facilitating custom user sessions and personalization after authentication.