Flow: enter email → magic link → verified → Stripe checkout → dashboard - SessionsController: new/create (send magic link), sent, verify, destroy - Customer model: generate_magic_token!, magic_token_valid?, verify_email! - Migration: magic_token, magic_token_expires_at, email_verified_at + unique indexes - CustomerMailer + mailer layout with magic link email (html + text) - CheckoutController: GET /checkout/start requires auth, passes customer_id as Stripe metadata; webhook finds customer by metadata and updates record - DashboardController: requires auth, uses current_customer from session - ApplicationController: current_customer, require_auth, redirect_after_auth (stores return_to so verify sends user back to where they were headed) - Resend gem + initializer; production uses :resend delivery method - Dev logs magic link URL to Rails logger instead of sending email - Pricing page: simple link to /checkout/start (no more JS fetch) - Layout: Sign in / Dashboard / Sign out nav links Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
16 lines
752 B
Text
16 lines
752 B
Text
<% content_for :title, "Check your email — Crimata" %>
|
|
|
|
<style>
|
|
.sent-wrap { max-width: 400px; margin: 0 auto; padding-top: 2rem; text-align: center; }
|
|
.sent-wrap .icon { font-size: 3rem; margin-bottom: 1.5rem; }
|
|
.sent-wrap h1 { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.5px; margin-bottom: 0.75rem; }
|
|
.sent-wrap p { color: #555; font-size: 0.95rem; line-height: 1.6; margin-bottom: 1rem; }
|
|
.sent-wrap a { color: #111; font-weight: 500; }
|
|
</style>
|
|
|
|
<div class="sent-wrap">
|
|
<div class="icon">✉</div>
|
|
<h1>Check your email</h1>
|
|
<p>We sent a sign-in link to your inbox. Click it to continue — the link expires in 15 minutes.</p>
|
|
<p>Wrong address? <a href="<%= login_path %>">Go back</a> and try again.</p>
|
|
</div>
|