Module: Studio::MagicLinkIssuing

Extended by:
ActiveSupport::Concern
Included in:
MagicLinksController, LocalReviewsController, UserMailer
Defined in:
app/controllers/concerns/studio/magic_link_issuing.rb

Overview

Minting a magic link, and building the URL that consumes it — the two halves of one decision (Studio.magic_link_store), kept in one place so they can never drift apart. A token minted in the :database store is only consumable at /l/; a :signed token only at /magic_link/. Handing out the wrong URL for the store yields an "invalid or expired link" on a link that was valid — the failure mode this concern exists to prevent.

Included by every issuer: MagicLinksController (the request-a-link flow), UserMailer (the emailed link), and Studio::LocalReviewsController (the dev-only local-review link). An app that overrides MagicLinksController wholesale brings its own issuing and is unaffected.