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
@@ -42,7 +42,7 @@ class JoinCodesController < ApplicationController
terminate_session if Current.identity
magic_link = identity.send_magic_link
flash[:magic_link_code] = magic_link&.code if Rails.env.development?
serve_development_magic_link(magic_link)
session[:return_to_after_authenticating] = new_users_join_url(script_name: @join_code.account.slug)
end