Module: Studio::MagicLinkIssuing
- Extended by:
- ActiveSupport::Concern
- Included in:
- MagicLinksController, RegistrationsController, 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, kept in one place so they can never drift apart. Handing out the wrong URL for a token yields an "invalid or expired link" on a link that was perfectly valid: the failure mode this concern exists to prevent.
Since 0.31.0 there is one store (a Studio::Link row) and one token format
(Studio::LinkToken.generate — 16 URL-safe characters), so the only remaining
question is the PATH: the standard /l/
Included by every issuer: MagicLinksController (the request-a-link flow), RegistrationsController (the passwordless signup POST), UserMailer (the emailed link), and Studio::LocalReviewsController (the dev-only local-review link). An app that overrides those wholesale brings its own issuing.