feat(identity): name, lifetime and last-used on personal API tokens

This commit is contained in:
sam committed 2026-10-27 15:37:44 +11:00
1 parent e5cb0ac00b
commit 04ce0f9056
23 files changed
+449 -99

No files matched your search

+1 -1
View File
@@ -164,7 +164,7 @@ export const api = {
authentication: <T = unknown>() => request<T>("/api/authentication"),
saveAuthentication: (body: unknown) => request<void>("/api/authentication",{method:"PUT",body,parse:false}),
tokens: <T = unknown>() => request<T>("/api/tokens"),
createToken: () => request<{token:string}>("/api/tokens",{method:"POST",body:{}}),
createToken: (name:string,days:number) => request<{token:string}>("/api/tokens",{method:"POST",body:{name,days}}),
revokeToken: (id:string) => request<void>(`/api/tokens/${encodeURIComponent(id)}`,{method:"DELETE",body:{},parse:false}),
passkeys: () => request<{passkeys:{id:string;name:string}[]}>("/api/account/passkeys"),
deletePasskey: (id:string) => request<void>(`/api/account/passkeys/${encodeURIComponent(id)}`,{method:"DELETE",body:{},parse:false}),