Skip to content

Commit 5a6fcbc

Browse files
committed
Auth verify: include email field for registered users
1 parent f744f44 commit 5a6fcbc

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

worker/src/routes/auth.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,11 +306,16 @@ authRoutes.post('/verify', async (c) => {
306306
pendingEmails = result?.count || 0;
307307
}
308308

309+
const email = account?.handle
310+
? `${account.handle}@${c.env.DOMAIN}`
311+
: (suggestedHandle ? `${suggestedHandle}@${c.env.DOMAIN}` : null);
312+
309313
return c.json({
310314
token,
311315
refresh_token,
312316
wallet,
313317
handle: account?.handle || null,
318+
email,
314319
registered: !!account,
315320
basename,
316321
tier: account?.tier || 'free',

0 commit comments

Comments
 (0)