d5b4bba018
Re-apply the deeplink backend deferred out of PR1a: migration 00006 adds email_confirmations.purpose + link_token_hash (hand-edited jet), each issued code now carries an opaque 256-bit token (only its SHA-256 stored), and ConfirmByToken resolves a token to a login (confirm + clear guest) or a link (attach when free, signal merge when owned elsewhere). issueCode now embeds the /app/#/confirm/<token> link in the email. The confirm endpoint, gateway RPC and SPA route follow.
27 lines
522 B
Go
27 lines
522 B
Go
//
|
|
// Code generated by go-jet DO NOT EDIT.
|
|
//
|
|
// WARNING: Changes to this file may cause incorrect behavior
|
|
// and will be lost if the code is regenerated
|
|
//
|
|
|
|
package model
|
|
|
|
import (
|
|
"github.com/google/uuid"
|
|
"time"
|
|
)
|
|
|
|
type EmailConfirmations struct {
|
|
ConfirmationID uuid.UUID `sql:"primary_key"`
|
|
AccountID uuid.UUID
|
|
Email string
|
|
CodeHash string
|
|
ExpiresAt time.Time
|
|
Attempts int16
|
|
ConsumedAt *time.Time
|
|
CreatedAt time.Time
|
|
Purpose string
|
|
LinkTokenHash *string
|
|
}
|