Hey ![]()
This is actually a bit more involved than it may seem.
The way login by email works is that when you click the “with email” button in the login modal a token is generated, specific to that user and stored in email_tokens. You can see that token in the link (the string of numbers and letters)
http://localhost:3000/session/email-login/69c4953ff0726b5f4c2b26c1e3563b79
You’d have to generate this token for the links in your app each time the user logs into your app. I don’t think (?) this functionality is exposed via the API currently so you’d first need to set up an endpoint.
That endpoint would have to be protected by authentication. You’d need a way of handling that in your app. Perhaps you have that already?
Then you’d need to consider things like token expiry. How long should the token remain valid? How do you fetch a new one and update the links once it expires?
It feels like there should be a better way of handling this issue than retro-fitting this feature.