Backend: - MagicPairingCode + MagicSession Prisma models - /api/magic/pair/create (6-digit code, 10min TTL, single-use) - /api/magic/pair/redeem (no auth, returns mgc_* token) - /api/magic/info (public DMG metadata) - requireUser() accepts mgc_* tokens Mac-App (RebreakMagic): - LoginView: 6-digit code input (OTP-style), real AppIcon, no signup - AuthService: signInWithPairingCode() replaces email/pw flow Native-App: - MagicSheet (TrueSheet) in Settings: download + code generator + linked Macs - AddMacSheet: subtle banner pointing to /settings - de/en locales
20 lines
544 B
TypeScript
20 lines
544 B
TypeScript
/**
|
|
* GET /api/magic/info
|
|
*
|
|
* Public — keine Auth. Liefert Metadaten für die Native-App-Settings-Seite:
|
|
* Download-URL der aktuellen DMG + Latest-Version.
|
|
*
|
|
* Auto-Updates passieren in der Mac-App selbst — hier nur Erstinstallation.
|
|
*/
|
|
export default defineEventHandler(() => {
|
|
return {
|
|
success: true,
|
|
data: {
|
|
latestVersion: '0.1.0',
|
|
downloadUrl: 'https://rebreak.org/download/rebreakmagic',
|
|
dmgUrl: 'https://rebreak.org/downloads/RebreakMagic-latest.dmg',
|
|
minMacosVersion: '13.0',
|
|
},
|
|
};
|
|
});
|