Access magic link token as string for testing
I'm trying to write a test where a user first requests a magic link and then uses the token to log in. How can I get the generated JWT token in clear text? When doing something like this I get a token struct:
4 Replies
I realize that right now this is "testing the framework", but in the future when I implement a custom auth page I'd like to test the whole flow
Solution
I've used the test mailer for this from swoosh
It will send your process the mail
then you can pattern match it out
Was wondering if there was a cleaner way, but that should work. Thanks!