@tempoxyz/id 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/server/.vite/manifest.json +65 -65
- package/dist/app/server/assets/Grant-D_tun0mF.js.map +1 -1
- package/dist/app/server/assets/authorize-DXYo-K2n-B-6vqhvc.js +56 -0
- package/dist/app/server/assets/authorize-DXYo-K2n-B-6vqhvc.js.map +1 -0
- package/dist/app/server/assets/core-FSS9-r35.js +56 -0
- package/dist/app/server/assets/core-FSS9-r35.js.map +1 -0
- package/dist/app/server/assets/default-u_dwuiYb-Bby14ucv.js +2 -0
- package/dist/app/server/assets/{default-u_dwuiYb-DOrMMcg9.js.map → default-u_dwuiYb-Bby14ucv.js.map} +1 -1
- package/dist/app/server/assets/{dist-CoH0hD1s.js → dist-B9KiBJYw.js} +2 -2
- package/dist/app/server/assets/{dist-CoH0hD1s.js.map → dist-B9KiBJYw.js.map} +1 -1
- package/dist/app/server/assets/{dist-DcICI3fd.js → dist-CU1NXSiz.js} +2 -2
- package/dist/app/server/assets/{dist-DcICI3fd.js.map → dist-CU1NXSiz.js.map} +1 -1
- package/dist/app/server/assets/dist-CetH4JSY.js +1 -0
- package/dist/app/server/assets/{effect-QlVUlMFu-mXPkuQTb.js → effect-QlVUlMFu-Cm-eTtaO.js} +2 -2
- package/dist/app/server/assets/{effect-QlVUlMFu-mXPkuQTb.js.map → effect-QlVUlMFu-Cm-eTtaO.js.map} +1 -1
- package/dist/app/server/assets/factory-g3i_Ffi5.js +5 -0
- package/dist/app/server/assets/{factory-dvoOlKer.js.map → factory-g3i_Ffi5.js.map} +1 -1
- package/dist/app/server/assets/get-id-field-BpOAoqqI.js +6 -0
- package/dist/app/server/assets/get-id-field-BpOAoqqI.js.map +1 -0
- package/dist/app/server/assets/{index-CLddUTqr-CC33CMvS.js → index-CLddUTqr-CmgkbWi9.js} +2 -2
- package/dist/app/server/assets/{index-CLddUTqr-CC33CMvS.js.map → index-CLddUTqr-CmgkbWi9.js.map} +1 -1
- package/dist/app/server/assets/{index-DZEfthgZ-Ec2MMQ_e.js → index-DZEfthgZ-BnPmps9O.js} +2 -2
- package/dist/app/server/assets/{index-DZEfthgZ-Ec2MMQ_e.js.map → index-DZEfthgZ-BnPmps9O.js.map} +1 -1
- package/dist/app/server/assets/kysely-adapter-B8VoPArC.js +1 -0
- package/dist/app/server/assets/{schema-check-oLqvHR8y.js → schema-check-Bgwl1v0_.js} +2 -2
- package/dist/app/server/assets/{schema-check-oLqvHR8y.js.map → schema-check-Bgwl1v0_.js.map} +1 -1
- package/dist/app/server/assets/{sury-CWZTCd75-CDaOS2oM.js → sury-CWZTCd75-Bd_PzqCV.js} +2 -2
- package/dist/app/server/assets/{sury-CWZTCd75-CDaOS2oM.js.map → sury-CWZTCd75-Bd_PzqCV.js.map} +1 -1
- package/dist/app/server/assets/{valibot--1zFm7rT-CIKoH3MS.js → valibot--1zFm7rT-Dd2aEhWG.js} +2 -2
- package/dist/app/server/assets/{valibot--1zFm7rT-CIKoH3MS.js.map → valibot--1zFm7rT-Dd2aEhWG.js.map} +1 -1
- package/dist/app/server/assets/{valibot-D_HTw1Gn-BdPyLkXt.js → valibot-D_HTw1Gn-C1l3va6F.js} +2 -2
- package/dist/app/server/assets/{valibot-D_HTw1Gn-BdPyLkXt.js.map → valibot-D_HTw1Gn-C1l3va6F.js.map} +1 -1
- package/dist/app/server/assets/{zod-Bwrt9trS-BezI5Gi1.js → zod-Bwrt9trS-Dry2w0in.js} +2 -2
- package/dist/app/server/assets/{zod-Bwrt9trS-BezI5Gi1.js.map → zod-Bwrt9trS-Dry2w0in.js.map} +1 -1
- package/dist/app/server/assets/{zod-DSgpEGAE-DZ7M_Q33.js → zod-DSgpEGAE-BZMP86UA.js} +2 -2
- package/dist/app/server/assets/{zod-DSgpEGAE-DZ7M_Q33.js.map → zod-DSgpEGAE-BZMP86UA.js.map} +1 -1
- package/dist/app/server/index.js +35 -35
- package/dist/app/server/index.js.map +1 -1
- package/dist/client/Auth.d.ts +1 -1
- package/dist/client/Auth.d.ts.map +1 -1
- package/dist/client/Auth.js.map +1 -1
- package/dist/client/Decorator.d.ts +3 -1
- package/dist/client/Decorator.d.ts.map +1 -1
- package/dist/client/Decorator.js +1 -0
- package/dist/client/Decorator.js.map +1 -1
- package/dist/client/actions/passkey.d.ts +63 -2
- package/dist/client/actions/passkey.d.ts.map +1 -1
- package/dist/client/actions/passkey.js +121 -3
- package/dist/client/actions/passkey.js.map +1 -1
- package/dist/internal/Apps.d.ts +14 -0
- package/dist/internal/Apps.d.ts.map +1 -1
- package/dist/internal/Apps.js +14 -2
- package/dist/internal/Apps.js.map +1 -1
- package/dist/internal/Auth.d.ts +7 -0
- package/dist/internal/Auth.d.ts.map +1 -1
- package/dist/internal/Auth.js +2 -1
- package/dist/internal/Auth.js.map +1 -1
- package/dist/internal/Authorize.d.ts.map +1 -1
- package/dist/internal/Authorize.js +13 -13
- package/dist/internal/Authorize.js.map +1 -1
- package/dist/internal/ErrorResponse.d.ts +5 -0
- package/dist/internal/ErrorResponse.d.ts.map +1 -1
- package/dist/internal/ErrorResponse.js +8 -0
- package/dist/internal/ErrorResponse.js.map +1 -1
- package/dist/internal/KeyAuthorization.d.ts.map +1 -1
- package/dist/internal/KeyAuthorization.js +28 -28
- package/dist/internal/KeyAuthorization.js.map +1 -1
- package/dist/internal/Owner.d.ts +16 -0
- package/dist/internal/Owner.d.ts.map +1 -1
- package/dist/internal/Owner.js.map +1 -1
- package/dist/internal/Passkey.d.ts +66 -4
- package/dist/internal/Passkey.d.ts.map +1 -1
- package/dist/internal/Passkey.js +66 -30
- package/dist/internal/Passkey.js.map +1 -1
- package/dist/internal/Privy.d.ts +27 -0
- package/dist/internal/Privy.d.ts.map +1 -1
- package/dist/internal/Privy.js +82 -0
- package/dist/internal/Privy.js.map +1 -1
- package/dist/internal/TempoAccount.d.ts +57 -0
- package/dist/internal/TempoAccount.d.ts.map +1 -1
- package/dist/internal/TempoAccount.js +118 -5
- package/dist/internal/TempoAccount.js.map +1 -1
- package/dist/internal/owners/Privy.d.ts.map +1 -1
- package/dist/internal/owners/Privy.js +11 -2
- package/dist/internal/owners/Privy.js.map +1 -1
- package/package.json +1 -1
- package/src/api/account.ts +140 -103
- package/src/api/authenticate.ts +48 -51
- package/src/api/authorize.ts +35 -36
- package/src/api/device.ts +20 -23
- package/src/api/health.ts +1 -2
- package/src/api/lib/AccountStep.ts +75 -0
- package/src/api/lib/Auth.ts +6 -0
- package/src/api/lib/Cors.ts +3 -0
- package/src/api/lib/KeySigner.ts +1 -1
- package/src/api/oauth.ts +23 -22
- package/src/client/Auth.ts +1 -0
- package/src/client/Decorator.ts +6 -1
- package/src/client/actions/passkey.ts +197 -3
- package/src/internal/Apps.ts +26 -2
- package/src/internal/Auth.ts +4 -0
- package/src/internal/Authorize.ts +13 -15
- package/src/internal/ErrorResponse.ts +10 -0
- package/src/internal/KeyAuthorization.ts +28 -31
- package/src/internal/OpenApi.ts +35 -0
- package/src/internal/Owner.ts +16 -0
- package/src/internal/Passkey.ts +99 -34
- package/src/internal/Privy.ts +128 -0
- package/src/internal/TempoAccount.ts +221 -7
- package/src/internal/owners/Privy.ts +19 -6
- package/dist/app/server/assets/authorize-DXYo-K2n-rmQQ42x1.js +0 -56
- package/dist/app/server/assets/authorize-DXYo-K2n-rmQQ42x1.js.map +0 -1
- package/dist/app/server/assets/core-BBrZXfrB.js +0 -56
- package/dist/app/server/assets/core-BBrZXfrB.js.map +0 -1
- package/dist/app/server/assets/default-u_dwuiYb-DOrMMcg9.js +0 -2
- package/dist/app/server/assets/dist-CR6FW-yS.js +0 -1
- package/dist/app/server/assets/factory-dvoOlKer.js +0 -5
- package/dist/app/server/assets/get-id-field-OwLpfjj2.js +0 -6
- package/dist/app/server/assets/get-id-field-OwLpfjj2.js.map +0 -1
- package/dist/app/server/assets/kysely-adapter-B8tQwTcu.js +0 -1
package/src/api/authenticate.ts
CHANGED
|
@@ -71,8 +71,7 @@ namespace schema {
|
|
|
71
71
|
|
|
72
72
|
export const response = z.object({
|
|
73
73
|
sent: z.literal(true).meta({
|
|
74
|
-
description:
|
|
75
|
-
'The request is accepted. The value is the same for every address.',
|
|
74
|
+
description: 'Always `true`, so the response reveals no account.',
|
|
76
75
|
}),
|
|
77
76
|
})
|
|
78
77
|
}
|
|
@@ -82,11 +81,11 @@ namespace schema {
|
|
|
82
81
|
.object({
|
|
83
82
|
assertion: Passkey.schema.assertion.optional().meta({
|
|
84
83
|
description:
|
|
85
|
-
"The
|
|
84
|
+
"The passkey's assertion over options requested with the same `link`. Required with `link`, so only the passkey's holder can link it.",
|
|
86
85
|
}),
|
|
87
86
|
authorize: Authorize.schema.request.optional().meta({
|
|
88
87
|
description:
|
|
89
|
-
"
|
|
88
|
+
"A headless authorization request, as `POST /v1/authorize` takes it, to authorize the app in the same request. Only from a first-party app's page, and not with `link` or `oauth_query`.",
|
|
90
89
|
}),
|
|
91
90
|
code: z
|
|
92
91
|
.string()
|
|
@@ -103,12 +102,12 @@ namespace schema {
|
|
|
103
102
|
.optional()
|
|
104
103
|
.meta({
|
|
105
104
|
description:
|
|
106
|
-
"The email step
|
|
105
|
+
"The `link` of the email step, which links its wallet.tempo passkey to this user. Send it with the passkey's `assertion`.",
|
|
107
106
|
examples: ['dGhlIG5vbmNlIHRoYXQgdGhlIHN0ZXAgY2Fycmllcw'],
|
|
108
107
|
}),
|
|
109
108
|
passkey: z.literal(true).optional().meta({
|
|
110
109
|
description:
|
|
111
|
-
|
|
110
|
+
'With `authorize`, returns a passkey step for a passkey-owned account, in place of `webauthn_required`. Send its assertion to `POST /v1/authorize` to sign the key.',
|
|
112
111
|
}),
|
|
113
112
|
// The bound covers an authorization request's query, and limits what an unsigned query can
|
|
114
113
|
// write, since the passkey challenge stores its client ID before the signature is checked.
|
|
@@ -118,7 +117,7 @@ namespace schema {
|
|
|
118
117
|
.optional()
|
|
119
118
|
.meta({
|
|
120
119
|
description:
|
|
121
|
-
"The sign-in page
|
|
120
|
+
"The signed query string of the sign-in page, which names the app's pending authorization request.",
|
|
122
121
|
examples: [
|
|
123
122
|
'client_id=client_01JZ8Q6W3N1R5B4V7C2X9K0M3T&response_type=code&exp=1760000000&sig=Gx3kB0',
|
|
124
123
|
],
|
|
@@ -145,7 +144,7 @@ namespace schema {
|
|
|
145
144
|
}),
|
|
146
145
|
id: z.string().meta({
|
|
147
146
|
description:
|
|
148
|
-
"The user's ID, which is the `sub` of
|
|
147
|
+
"The user's ID, which is the `sub` claim of the user's tokens.",
|
|
149
148
|
examples: ['user_01JZ8Q6W3N1R5B4V7C2X9K0M3T'],
|
|
150
149
|
}),
|
|
151
150
|
})
|
|
@@ -157,14 +156,14 @@ namespace schema {
|
|
|
157
156
|
.optional()
|
|
158
157
|
.meta({
|
|
159
158
|
description:
|
|
160
|
-
"The app's
|
|
159
|
+
"The app's authorization, for a sign-in with `authorize`, or a passkey step with `passkey`. Absent for any other sign-in.",
|
|
161
160
|
}),
|
|
162
161
|
redirect: z
|
|
163
162
|
.url()
|
|
164
163
|
.nullable()
|
|
165
164
|
.meta({
|
|
166
165
|
description:
|
|
167
|
-
"
|
|
166
|
+
"The URL to send the browser to next, such as the app's `redirect_uri` with a code. `null` if no app waits on the sign-in.",
|
|
168
167
|
examples: [
|
|
169
168
|
'https://app.example.com/callback?code=SplxlOBeZQQYbYS6WxSbIA',
|
|
170
169
|
],
|
|
@@ -184,7 +183,7 @@ namespace schema {
|
|
|
184
183
|
.object({
|
|
185
184
|
authorize: Authorize.schema.request.optional().meta({
|
|
186
185
|
description:
|
|
187
|
-
"
|
|
186
|
+
"A headless authorization request, as `POST /v1/authorize` takes it. The passkey's one assertion then signs the user in and signs the key, and requires the same `client_id`.",
|
|
188
187
|
}),
|
|
189
188
|
client_id: z
|
|
190
189
|
.string()
|
|
@@ -193,7 +192,7 @@ namespace schema {
|
|
|
193
192
|
.optional()
|
|
194
193
|
.meta({
|
|
195
194
|
description:
|
|
196
|
-
"The
|
|
195
|
+
"The first-party app whose page runs the sign-in. Required from an app's page, which must be on a redirect URI origin of the app.",
|
|
197
196
|
examples: ['client_01JZ8Q6W3N1R5B4V7C2X9K0M3T'],
|
|
198
197
|
}),
|
|
199
198
|
credentialId: z
|
|
@@ -204,12 +203,12 @@ namespace schema {
|
|
|
204
203
|
.optional()
|
|
205
204
|
.meta({
|
|
206
205
|
description:
|
|
207
|
-
'
|
|
206
|
+
'Up to 16 credential IDs, base64url, that the browser offers. Defaults to every passkey of the relying party.',
|
|
208
207
|
examples: ['KEbWNCc7NgaYnUyrNeFGX9_3Y-8'],
|
|
209
208
|
}),
|
|
210
209
|
link: verify.json.shape.link.meta({
|
|
211
210
|
description:
|
|
212
|
-
|
|
211
|
+
'The `link` of the email step, which limits the options to its passkey. Send the assertion with `POST /v1/auth/code/verify`.',
|
|
213
212
|
examples: ['dGhlIG5vbmNlIHRoYXQgdGhlIHN0ZXAgY2Fycmllcw'],
|
|
214
213
|
}),
|
|
215
214
|
mediation: z
|
|
@@ -217,7 +216,7 @@ namespace schema {
|
|
|
217
216
|
.optional()
|
|
218
217
|
.meta({
|
|
219
218
|
description:
|
|
220
|
-
'
|
|
219
|
+
'The `mediation` of the options, such as `conditional` for passkey autofill.',
|
|
221
220
|
examples: ['conditional'],
|
|
222
221
|
}),
|
|
223
222
|
oauth_query: verify.json.shape.oauth_query,
|
|
@@ -227,7 +226,7 @@ namespace schema {
|
|
|
227
226
|
.optional()
|
|
228
227
|
.meta({
|
|
229
228
|
description:
|
|
230
|
-
|
|
229
|
+
'The user code of the device grant that the sign-in continues, whose app selects the realm. Ignored with `oauth_query` or `client_id`.',
|
|
231
230
|
examples: ['WDJB-MJHT'],
|
|
232
231
|
}),
|
|
233
232
|
})
|
|
@@ -262,16 +261,18 @@ namespace schema {
|
|
|
262
261
|
description: 'The credential type.',
|
|
263
262
|
}),
|
|
264
263
|
})
|
|
265
|
-
.meta({
|
|
264
|
+
.meta({
|
|
265
|
+
description: 'A passkey that the browser offers.',
|
|
266
|
+
}),
|
|
266
267
|
)
|
|
267
268
|
.optional()
|
|
268
269
|
.meta({
|
|
269
270
|
description:
|
|
270
|
-
'The passkeys the browser offers
|
|
271
|
+
'The passkeys that the browser offers. Absent to offer every passkey of the relying party.',
|
|
271
272
|
}),
|
|
272
273
|
challenge: z.templateLiteral(['0x', z.string()]).meta({
|
|
273
274
|
description:
|
|
274
|
-
'The single-use challenge, as hex
|
|
275
|
+
'The single-use challenge, as hex, which expires after 5 minutes.',
|
|
275
276
|
examples: [
|
|
276
277
|
'0xf6310589abb21116acc6e123967ed0a125b5041c43f8e157237093e07eaa354c',
|
|
277
278
|
],
|
|
@@ -282,16 +283,16 @@ namespace schema {
|
|
|
282
283
|
}),
|
|
283
284
|
userVerification: z.literal('required').meta({
|
|
284
285
|
description:
|
|
285
|
-
'
|
|
286
|
+
'Requires user verification, such as a biometric or PIN.',
|
|
286
287
|
}),
|
|
287
288
|
})
|
|
288
289
|
.meta({
|
|
289
290
|
description:
|
|
290
|
-
'The `PublicKeyCredentialRequestOptions`,
|
|
291
|
+
'The `PublicKeyCredentialRequestOptions`, with the challenge as hex.',
|
|
291
292
|
}),
|
|
292
293
|
})
|
|
293
294
|
.meta({
|
|
294
|
-
description: 'The
|
|
295
|
+
description: 'The argument for `navigator.credentials.get()`.',
|
|
295
296
|
}),
|
|
296
297
|
})
|
|
297
298
|
}
|
|
@@ -310,26 +311,25 @@ namespace schema {
|
|
|
310
311
|
.object({
|
|
311
312
|
link: z.string().meta({
|
|
312
313
|
description:
|
|
313
|
-
'
|
|
314
|
+
'The value to send as `link` with the email sign-in, which links the passkey.',
|
|
314
315
|
examples: ['dGhlIG5vbmNlIHRoYXQgdGhlIHN0ZXAgY2Fycmllcw'],
|
|
315
316
|
}),
|
|
316
317
|
signed: z.literal(false).meta({
|
|
317
|
-
description:
|
|
318
|
-
'Whether the assertion already signed a key authorization. This route signs none.',
|
|
318
|
+
description: 'Always `false`, since this step signs no key.',
|
|
319
319
|
}),
|
|
320
320
|
type: z.literal('email').meta({
|
|
321
321
|
description:
|
|
322
|
-
'Sign in with an emailed code
|
|
322
|
+
'Sign in with an emailed code to link the passkey.',
|
|
323
323
|
}),
|
|
324
324
|
})
|
|
325
325
|
.meta({
|
|
326
326
|
description:
|
|
327
|
-
'The email step, for a wallet.tempo passkey
|
|
327
|
+
'The email step, for a wallet.tempo passkey without an email.',
|
|
328
328
|
}),
|
|
329
329
|
})
|
|
330
330
|
.meta({
|
|
331
331
|
description:
|
|
332
|
-
'A passkey sign-in that
|
|
332
|
+
'A passkey sign-in that needs an email sign-in to finish.',
|
|
333
333
|
}),
|
|
334
334
|
])
|
|
335
335
|
}
|
|
@@ -350,8 +350,7 @@ namespace schema {
|
|
|
350
350
|
.string()
|
|
351
351
|
.nullable()
|
|
352
352
|
.meta({
|
|
353
|
-
description:
|
|
354
|
-
"The user's name, or `null` for a user who signed up without one.",
|
|
353
|
+
description: "The user's name, or `null` if the user has none.",
|
|
355
354
|
examples: ['Ada Lovelace'],
|
|
356
355
|
}),
|
|
357
356
|
})
|
|
@@ -392,15 +391,14 @@ namespace schema {
|
|
|
392
391
|
.optional()
|
|
393
392
|
.meta({
|
|
394
393
|
description:
|
|
395
|
-
|
|
394
|
+
'The page to return to after sign-in. Only a path on the device page is accepted.',
|
|
396
395
|
examples: ['/device?code=WDJB-MJHT'],
|
|
397
396
|
}),
|
|
398
397
|
})
|
|
399
398
|
|
|
400
399
|
export const response = z.object({
|
|
401
400
|
passkeys: z.boolean().meta({
|
|
402
|
-
description:
|
|
403
|
-
"Whether one of the sign-in's realms holds passkeys that sign in at Tempo ID's origin, so the page offers passkey sign-in.",
|
|
401
|
+
description: 'Whether the page offers passkey sign-in.',
|
|
404
402
|
examples: [true],
|
|
405
403
|
}),
|
|
406
404
|
app: z
|
|
@@ -408,7 +406,7 @@ namespace schema {
|
|
|
408
406
|
.nullable()
|
|
409
407
|
.meta({
|
|
410
408
|
description:
|
|
411
|
-
'The display name of the app
|
|
409
|
+
'The display name of the app in `oauth_query`, or its client ID if it has none. `null` for an invalid query or an unknown app.',
|
|
412
410
|
examples: ['Tempo Cash'],
|
|
413
411
|
}),
|
|
414
412
|
host: z
|
|
@@ -416,14 +414,14 @@ namespace schema {
|
|
|
416
414
|
.nullable()
|
|
417
415
|
.meta({
|
|
418
416
|
description:
|
|
419
|
-
"The host of a third-party app's client ID, which the page shows beside its name
|
|
417
|
+
"The host of a third-party app's client ID, which the page shows beside its name. `null` for a registered app.",
|
|
420
418
|
examples: ['app.example'],
|
|
421
419
|
}),
|
|
422
420
|
request: z
|
|
423
421
|
.object({
|
|
424
422
|
app: z.string().meta({
|
|
425
423
|
description:
|
|
426
|
-
"The app's display name, or its client ID
|
|
424
|
+
"The app's display name, or its client ID if it has none.",
|
|
427
425
|
examples: ['Tempo Cash'],
|
|
428
426
|
}),
|
|
429
427
|
key: KeyAuthorization.schema.description,
|
|
@@ -431,14 +429,14 @@ namespace schema {
|
|
|
431
429
|
.nullable()
|
|
432
430
|
.meta({
|
|
433
431
|
description:
|
|
434
|
-
'The app and the key
|
|
432
|
+
'The app and the key that the request in `oauth_query` grants on sign-in. `null` if the sign-in grants no key.',
|
|
435
433
|
}),
|
|
436
434
|
return_to: z
|
|
437
435
|
.string()
|
|
438
436
|
.nullable()
|
|
439
437
|
.meta({
|
|
440
438
|
description:
|
|
441
|
-
'The page
|
|
439
|
+
'The page to return to after sign-in, or `null` for the account page.',
|
|
442
440
|
examples: ['/device?code=WDJB-MJHT'],
|
|
443
441
|
}),
|
|
444
442
|
user_code: z
|
|
@@ -446,12 +444,12 @@ namespace schema {
|
|
|
446
444
|
.nullable()
|
|
447
445
|
.meta({
|
|
448
446
|
description:
|
|
449
|
-
'The user code of the device page
|
|
447
|
+
'The user code of the device page to return to, or `null`.',
|
|
450
448
|
examples: ['WDJBMJHT'],
|
|
451
449
|
}),
|
|
452
450
|
verified: z.boolean().meta({
|
|
453
451
|
description:
|
|
454
|
-
'Whether `app` is a registered app,
|
|
452
|
+
'Whether `app` is a registered app, which the page marks as verified. `false` for a third-party app.',
|
|
455
453
|
examples: [true],
|
|
456
454
|
}),
|
|
457
455
|
})
|
|
@@ -520,7 +518,7 @@ export const authenticate = new Hono<Env>()
|
|
|
520
518
|
'/v1/auth/code',
|
|
521
519
|
OpenApi.describeRoute({
|
|
522
520
|
description:
|
|
523
|
-
'
|
|
521
|
+
'Email sign-in, step 1 of 2: emails a sign-in code. The response is the same for every address, so it reveals no account.',
|
|
524
522
|
responses: OpenApi.responses({
|
|
525
523
|
errors: [
|
|
526
524
|
...BodyLimit.errors,
|
|
@@ -531,8 +529,7 @@ export const authenticate = new Hono<Env>()
|
|
|
531
529
|
ErrorResponse.UpstreamUnavailableError,
|
|
532
530
|
],
|
|
533
531
|
success: {
|
|
534
|
-
description:
|
|
535
|
-
'The response for every address: the email service accepted the code, or does not deliver to the address.',
|
|
532
|
+
description: 'The same response for every address.',
|
|
536
533
|
schema: schema.code.response,
|
|
537
534
|
},
|
|
538
535
|
}),
|
|
@@ -608,7 +605,7 @@ export const authenticate = new Hono<Env>()
|
|
|
608
605
|
'/v1/auth/code/verify',
|
|
609
606
|
OpenApi.describeRoute({
|
|
610
607
|
description:
|
|
611
|
-
'
|
|
608
|
+
'Email sign-in, step 2 of 2: verifies the code, sets the session cookie, and creates a Tempo Account for a user who has none. With `authorize`, it also authorizes the app, as `POST /v1/authorize` does.',
|
|
612
609
|
responses: OpenApi.responses({
|
|
613
610
|
errors: [
|
|
614
611
|
...BodyLimit.errors,
|
|
@@ -881,7 +878,7 @@ export const authenticate = new Hono<Env>()
|
|
|
881
878
|
'/v1/auth/passkey/options',
|
|
882
879
|
OpenApi.describeRoute({
|
|
883
880
|
description:
|
|
884
|
-
|
|
881
|
+
'Passkey sign-in, step 1 of 2: returns the options for `navigator.credentials.get()`. The app that `oauth_query`, `client_id`, or `user_code` names selects the relying party.',
|
|
885
882
|
responses: OpenApi.responses({
|
|
886
883
|
errors: [
|
|
887
884
|
...BodyLimit.errors,
|
|
@@ -1117,7 +1114,7 @@ export const authenticate = new Hono<Env>()
|
|
|
1117
1114
|
'/v1/auth/passkey/verify',
|
|
1118
1115
|
OpenApi.describeRoute({
|
|
1119
1116
|
description:
|
|
1120
|
-
|
|
1117
|
+
"Passkey sign-in, step 2 of 2: verifies the passkey's assertion, sets the session cookie, and creates a Tempo Account for a user who has none.",
|
|
1121
1118
|
responses: OpenApi.responses({
|
|
1122
1119
|
errors: [
|
|
1123
1120
|
...BodyLimit.errors,
|
|
@@ -1132,7 +1129,7 @@ export const authenticate = new Hono<Env>()
|
|
|
1132
1129
|
],
|
|
1133
1130
|
success: {
|
|
1134
1131
|
description:
|
|
1135
|
-
'The signed-in user
|
|
1132
|
+
'The signed-in user and any authorization, or the email step for a wallet.tempo passkey without an email.',
|
|
1136
1133
|
schema: schema.passkeyVerify.response,
|
|
1137
1134
|
},
|
|
1138
1135
|
}),
|
|
@@ -1405,7 +1402,7 @@ export const authenticate = new Hono<Env>()
|
|
|
1405
1402
|
'/v1/auth/logout',
|
|
1406
1403
|
OpenApi.describeRoute({
|
|
1407
1404
|
description:
|
|
1408
|
-
'Signs out: ends the session, revokes the
|
|
1405
|
+
'Signs out: ends the session, revokes the tokens that apps received through it, and clears the cookie.',
|
|
1409
1406
|
responses: OpenApi.responses({
|
|
1410
1407
|
errors: [...BodyLimit.errors, ErrorResponse.CrossSiteRequestError],
|
|
1411
1408
|
success: {
|
|
@@ -1431,7 +1428,7 @@ export const authenticate = new Hono<Env>()
|
|
|
1431
1428
|
.get(
|
|
1432
1429
|
'/v1/auth/session',
|
|
1433
1430
|
OpenApi.describeRoute({
|
|
1434
|
-
description: '
|
|
1431
|
+
description: 'Returns the signed-in user, or `null` without a session.',
|
|
1435
1432
|
responses: OpenApi.responses({
|
|
1436
1433
|
success: {
|
|
1437
1434
|
description: 'The session.',
|
|
@@ -1461,7 +1458,7 @@ export const authenticate = new Hono<Env>()
|
|
|
1461
1458
|
'/v1/auth/assets',
|
|
1462
1459
|
OpenApi.describeRoute({
|
|
1463
1460
|
description:
|
|
1464
|
-
"Lists the sign-in page's scripts and style sheets, which a page on Tempo ID's site
|
|
1461
|
+
"Lists the sign-in page's scripts and style sheets, which a page on Tempo ID's site can prefetch before it redirects to sign-in.",
|
|
1465
1462
|
responses: OpenApi.responses({
|
|
1466
1463
|
success: {
|
|
1467
1464
|
description: 'The assets.',
|
|
@@ -1485,7 +1482,7 @@ export const authenticate = new Hono<Env>()
|
|
|
1485
1482
|
'/v1/auth/methods',
|
|
1486
1483
|
OpenApi.describeRoute({
|
|
1487
1484
|
description:
|
|
1488
|
-
'
|
|
1485
|
+
'Returns what the sign-in page shows: the sign-in methods, any key that `oauth_query` requests, and the page that sign-in returns to.',
|
|
1489
1486
|
responses: OpenApi.responses({
|
|
1490
1487
|
errors: [...OpenApi.validate.errors],
|
|
1491
1488
|
success: {
|