Make sign up Magic Links work across devices
Previously if someone started signing in on their phone, but finished it on their laptop, they'd end up on the menu screen with no account. Bu tracking the purpose of a Magic Link we can always direct the user to sign up if they requested a magic link through sign up. This also makes the logic for changing the copy in the email more robust.
This commit is contained in:
@@ -32,8 +32,8 @@ class MagicLinkTest < ActiveSupport::TestCase
|
||||
magic_link = MagicLink.create!(identity: identities(:kevin))
|
||||
code_with_spaces = magic_link.code.downcase.chars.join(" ")
|
||||
|
||||
identity = MagicLink.consume(code_with_spaces)
|
||||
assert_equal identities(:kevin), identity
|
||||
consumed_magic_link = MagicLink.consume(code_with_spaces)
|
||||
assert_equal magic_link, consumed_magic_link
|
||||
assert_not MagicLink.exists?(magic_link.id)
|
||||
|
||||
expired_link = MagicLink.create!(identity: identities(:kevin))
|
||||
|
||||
Reference in New Issue
Block a user