Add some protections around sharing the magic link in development

This commit is contained in:
Jorge Manrubia
2025-12-02 10:51:14 +01:00
parent e1989bdef1
commit c9ebb79dbd
4 changed files with 16 additions and 2 deletions
+1 -1
View File
@@ -11,7 +11,7 @@ class SessionsController < ApplicationController
def create
if identity = Identity.find_by_email_address(email_address)
magic_link = identity.send_magic_link
flash[:magic_link_code] = magic_link&.code if Rails.env.development?
serve_development_magic_link(magic_link)
end
redirect_to session_magic_link_path