Dominevo
ReferenceHTTP API

auth

The auth router: 61 hand-written core methods, with tier, input and output.

A core router of the hub (not a capability), source server/backend/src/api/core/auth.router.ts. Its methods are called at /trpc/auth.<method>. A core method checks only the tier: a scoped token that is signed in reaches every protected method here, unless the method itself refuses it. See How to call and Authorization.

Inputs and outputs are the validation schemas as written in the source.

MethodKindTier
loginmutationpublic (rate-limited)
loginVerifyTotpmutationpublic (rate-limited)
loginBeginPasskeymutationpublic (rate-limited)
loginVerifyPasskeymutationpublic (rate-limited)
passkeyLoginBeginmutationpublic (rate-limited)
passkeyLoginFinishmutationpublic (rate-limited)
exchangeSessionmutationpublic (rate-limited)
createHandoffCodemutationprotected
redeemHandoffCodemutationpublic (rate-limited)
mequeryprotected
deviceAccessqueryprotected
previewScopequeryadmin
changeOwnPasswordmutationprotected
setupOwnTotpmutationprotected
confirmOwnTotpmutationprotected
disableOwnTotpmutationprotected
getOwnTotpStatusqueryprotected
beginOwnPasskeyRegistrationmutationprotected
finishOwnPasskeyRegistrationmutationprotected
listOwnPasskeysqueryprotected
removeOwnPasskeymutationprotected
getOwnPasskeySecondFactorPreferencequeryprotected
setOwnPasskeySecondFactorPreferencemutationprotected
listLinkableProvidersqueryprotected
beginExternalLinkmutationprotected
completeExternalLinkmutationprotected
createBrowserHandoffmutationprotected
listOwnExternalIdentitiesqueryprotected
unlinkOwnExternalIdentitymutationprotected
listLoginMethodsquerypublic
getServerNamequerypublic
refreshSessionmutationpublic (rate-limited)
logoutmutationprotected
listOwnSessionsqueryprotected
revokeOwnSessionmutationprotected
listSessionsqueryadmin
revokeSessionsmutationadmin
cliLoginBeginmutationpublic (rate-limited)
cliLoginPollmutationpublic (rate-limited)
cliLoginDescribequeryprotected
cliLoginApprovemutationprotected
cliLoginDenymutationprotected
cliLoginPendingqueryprotected
completeEnrollmentmutationpublic
getDeviceChallengemutationpublic
loginWithDeviceCertificatemutationpublic
renewDeviceCertificatemutationpublic
revokeOwnDeviceCertificatemutationpublic
listOwnDeviceCredentialsqueryprotected
revokeOwnDeviceCredentialmutationprotected
deviceEnrollProofFromReauthmutationprotected
deviceEnrollProofFromHandoffmutationprotected
enrollSelfmutationprotected
reauthBeginPasskeymutationprotected
reauthenticatemutationprotected
listAuthAuditqueryadmin
mintTokenmutationprotected
listTokensqueryprotected
extendTokenmutationprotected
revokeTokenmutationprotected
revokeCredentialsmutationadmin

auth.login

  • Kind: mutation — POST /trpc/auth.login
  • Tier: public — no credential needed, limited per client address
  • Source: server/backend/src/api/core/auth.router.ts:679
  • Try it: open /system/api-explorer?method=auth.login on your hub

Input

z.object({ username: z.string(), password: z.string(), refreshable: RefreshableInput })

Output

LoginResultSchema = z.object({ token: z.string(), user: z.object({ id: z.string(), username: z.string(), isAdmin: z.boolean() }), requiresTotp: z.boolean().optional(), secondFactors: z.array(SecondFactorSchema).optional(), expiresAt: z.number().optional(), sessionId: z.string().optional(), sessionExpiresAt: z.number().optional(), refreshToken: z.string().optional() })

auth.loginVerifyTotp

  • Kind: mutation — POST /trpc/auth.loginVerifyTotp
  • Tier: public — no credential needed, limited per client address
  • Source: server/backend/src/api/core/auth.router.ts:753
  • Try it: open /system/api-explorer?method=auth.loginVerifyTotp on your hub

Input

z.object({ challengeToken: z.string(), code: z.string(), refreshable: RefreshableInput })

Output

LoginResultSchema = z.object({ token: z.string(), user: z.object({ id: z.string(), username: z.string(), isAdmin: z.boolean() }), requiresTotp: z.boolean().optional(), secondFactors: z.array(SecondFactorSchema).optional(), expiresAt: z.number().optional(), sessionId: z.string().optional(), sessionExpiresAt: z.number().optional(), refreshToken: z.string().optional() })

auth.loginBeginPasskey

  • Kind: mutation — POST /trpc/auth.loginBeginPasskey
  • Tier: public — no credential needed, limited per client address
  • Source: server/backend/src/api/core/auth.router.ts:789
  • Try it: open /system/api-explorer?method=auth.loginBeginPasskey on your hub

Input

z.object({ challengeToken: z.string() })

Output

OptionsJsonSchema = z.object({ optionsJSON: z.record(z.string(), z.unknown()) })

auth.loginVerifyPasskey

  • Kind: mutation — POST /trpc/auth.loginVerifyPasskey
  • Tier: public — no credential needed, limited per client address
  • Source: server/backend/src/api/core/auth.router.ts:813
  • Try it: open /system/api-explorer?method=auth.loginVerifyPasskey on your hub

Input

z.object({ challengeToken: z.string(), response: z.record(z.string(), z.unknown()), refreshable: RefreshableInput })

Output

LoginResultSchema = z.object({ token: z.string(), user: z.object({ id: z.string(), username: z.string(), isAdmin: z.boolean() }), requiresTotp: z.boolean().optional(), secondFactors: z.array(SecondFactorSchema).optional(), expiresAt: z.number().optional(), sessionId: z.string().optional(), sessionExpiresAt: z.number().optional(), refreshToken: z.string().optional() })

auth.passkeyLoginBegin

  • Kind: mutation — POST /trpc/auth.passkeyLoginBegin
  • Tier: public — no credential needed, limited per client address
  • Source: server/backend/src/api/core/auth.router.ts:863
  • Try it: open /system/api-explorer?method=auth.passkeyLoginBegin on your hub

Input

z.void()

Output

OptionsJsonSchema = z.object({ optionsJSON: z.record(z.string(), z.unknown()) })

auth.passkeyLoginFinish

  • Kind: mutation — POST /trpc/auth.passkeyLoginFinish
  • Tier: public — no credential needed, limited per client address
  • Source: server/backend/src/api/core/auth.router.ts:887
  • Try it: open /system/api-explorer?method=auth.passkeyLoginFinish on your hub

Input

z.object({ response: z.record(z.string(), z.unknown()), refreshable: RefreshableInput })

Output

LoginResultSchema = z.object({ token: z.string(), user: z.object({ id: z.string(), username: z.string(), isAdmin: z.boolean() }), requiresTotp: z.boolean().optional(), secondFactors: z.array(SecondFactorSchema).optional(), expiresAt: z.number().optional(), sessionId: z.string().optional(), sessionExpiresAt: z.number().optional(), refreshToken: z.string().optional() })

auth.exchangeSession

  • Kind: mutation — POST /trpc/auth.exchangeSession
  • Tier: public — no credential needed, limited per client address
  • Source: server/backend/src/api/core/auth.router.ts:949
  • Try it: open /system/api-explorer?method=auth.exchangeSession on your hub

Input

z.object({ refreshable: RefreshableInput }).optional()

Output

LoginResultSchema = z.object({ token: z.string(), user: z.object({ id: z.string(), username: z.string(), isAdmin: z.boolean() }), requiresTotp: z.boolean().optional(), secondFactors: z.array(SecondFactorSchema).optional(), expiresAt: z.number().optional(), sessionId: z.string().optional(), sessionExpiresAt: z.number().optional(), refreshToken: z.string().optional() })

auth.createHandoffCode

  • Kind: mutation — POST /trpc/auth.createHandoffCode
  • Tier: protected — any signed-in principal
  • Source: server/backend/src/api/core/auth.router.ts:1016
  • Try it: open /system/api-explorer?method=auth.createHandoffCode on your hub

Input

z.object({ purpose: z.enum(['renew', 'new-session', 'step-up']).optional(), codeChallenge: z.string().min(43).max(128).optional(), state: z.string().min(1).max(256).optional(), reauthToken: ReauthTokenInput.optional() }).optional()

Output

z.object({ code: z.string(), expiresAt: z.number() })

auth.redeemHandoffCode

  • Kind: mutation — POST /trpc/auth.redeemHandoffCode
  • Tier: public — no credential needed, limited per client address
  • Source: server/backend/src/api/core/auth.router.ts:1066
  • Try it: open /system/api-explorer?method=auth.redeemHandoffCode on your hub

Input

z.object({ code: z.string().min(1), refreshable: RefreshableInput, codeVerifier: z.string().min(1).max(256).optional(), state: z.string().min(1).max(256).optional() })

Output

LoginResultSchema = z.object({ token: z.string(), user: z.object({ id: z.string(), username: z.string(), isAdmin: z.boolean() }), requiresTotp: z.boolean().optional(), secondFactors: z.array(SecondFactorSchema).optional(), expiresAt: z.number().optional(), sessionId: z.string().optional(), sessionExpiresAt: z.number().optional(), refreshToken: z.string().optional() })

auth.me

  • Kind: query — GET /trpc/auth.me
  • Tier: protected — any signed-in principal
  • Source: server/backend/src/api/core/auth.router.ts:1140
  • Try it: open /system/api-explorer?method=auth.me on your hub

Input

z.void()

Output

MeSchema = z.object({ id: z.string(), username: z.string(), isAdmin: z.boolean(), permissions: z.object({ isAdmin: z.boolean(), allowedProviders: z.union([z.literal('*'), z.array(z.string())]), allowedDevices: z.record(z.string(), z.unknown()) }), isApiKey: z.boolean(), scope: EffectiveScopeSchema.optional() }).nullable()

auth.deviceAccess

  • Kind: query — GET /trpc/auth.deviceAccess
  • Tier: protected — any signed-in principal
  • Source: server/backend/src/api/core/auth.router.ts:1165
  • Try it: open /system/api-explorer?method=auth.deviceAccess on your hub

Input

z.object({ deviceId: z.number().int() })

Output

DeviceAccessSchema = z.object({ view: z.boolean(), command: z.boolean() })

auth.previewScope

  • Kind: query — GET /trpc/auth.previewScope
  • Tier: admin — an administrator only
  • Source: server/backend/src/api/core/auth.router.ts:1194
  • Try it: open /system/api-explorer?method=auth.previewScope on your hub

Input

z.object({ scopes: z.array(UserScopeSchema), isAdmin: z.boolean().default(false) })

Output

EffectiveScopeSchema = z.object({ isAdmin: z.boolean(), role: z.enum(['admin', 'viewer', 'scoped']), features: z.array(ViewerFeatureIdSchema).readonly(), allDevicesViewable: z.boolean(), viewableDeviceCount: z.number().int(), device: z.object({ view: DeviceReachSummarySchema, create: DeviceReachSummarySchema, delete: DeviceReachSummarySchema }), system: z.array(MethodAccessSchema).readonly(), capabilities: z.array(ScopeGrantSummarySchema).readonly(), addons: z.array(ScopeGrantSummarySchema).readonly() })

auth.changeOwnPassword

  • Kind: mutation — POST /trpc/auth.changeOwnPassword
  • Tier: protected — any signed-in principal
  • Source: server/backend/src/api/core/auth.router.ts:1218
  • Try it: open /system/api-explorer?method=auth.changeOwnPassword on your hub

Input

z.object({ currentPassword: z.string().min(1), newPassword: z.string().min(8) })

Output

z.object({ success: z.literal(true) })

auth.setupOwnTotp

  • Kind: mutation — POST /trpc/auth.setupOwnTotp
  • Tier: protected — any signed-in principal
  • Source: server/backend/src/api/core/auth.router.ts:1261
  • Try it: open /system/api-explorer?method=auth.setupOwnTotp on your hub

Input

z.void()

Output

z.object({ secret: z.string(), otpauthUrl: z.string() })

auth.confirmOwnTotp

  • Kind: mutation — POST /trpc/auth.confirmOwnTotp
  • Tier: protected — any signed-in principal
  • Source: server/backend/src/api/core/auth.router.ts:1276
  • Try it: open /system/api-explorer?method=auth.confirmOwnTotp on your hub

Input

z.object({ code: z.string().min(1) })

Output

z.object({ success: z.literal(true) })

auth.disableOwnTotp

  • Kind: mutation — POST /trpc/auth.disableOwnTotp
  • Tier: protected — any signed-in principal
  • Source: server/backend/src/api/core/auth.router.ts:1289
  • Try it: open /system/api-explorer?method=auth.disableOwnTotp on your hub

Input

z.object({ reauthToken: ReauthTokenInput }).optional()

Output

z.object({ success: z.literal(true) })

auth.getOwnTotpStatus

  • Kind: query — GET /trpc/auth.getOwnTotpStatus
  • Tier: protected — any signed-in principal
  • Source: server/backend/src/api/core/auth.router.ts:1304
  • Try it: open /system/api-explorer?method=auth.getOwnTotpStatus on your hub

Input

z.void()

Output

z.object({ enabled: z.boolean(), confirmedAt: z.number().nullable() })

auth.beginOwnPasskeyRegistration

  • Kind: mutation — POST /trpc/auth.beginOwnPasskeyRegistration
  • Tier: protected — any signed-in principal
  • Source: server/backend/src/api/core/auth.router.ts:1328
  • Try it: open /system/api-explorer?method=auth.beginOwnPasskeyRegistration on your hub

Input

z.void()

Output

OptionsJsonSchema = z.object({ optionsJSON: z.record(z.string(), z.unknown()) })

auth.finishOwnPasskeyRegistration

  • Kind: mutation — POST /trpc/auth.finishOwnPasskeyRegistration
  • Tier: protected — any signed-in principal
  • Source: server/backend/src/api/core/auth.router.ts:1338
  • Try it: open /system/api-explorer?method=auth.finishOwnPasskeyRegistration on your hub

Input

z.object({ response: z.record(z.string(), z.unknown()), label: z.string() })

Output

FinishRegistrationSchema = z.object({ success: z.literal(true), credentialId: z.string() })

auth.listOwnPasskeys

  • Kind: query — GET /trpc/auth.listOwnPasskeys
  • Tier: protected — any signed-in principal
  • Source: server/backend/src/api/core/auth.router.ts:1352
  • Try it: open /system/api-explorer?method=auth.listOwnPasskeys on your hub

Input

z.void()

Output

z.array(PasskeySummarySchema)

auth.removeOwnPasskey

  • Kind: mutation — POST /trpc/auth.removeOwnPasskey
  • Tier: protected — any signed-in principal
  • Source: server/backend/src/api/core/auth.router.ts:1366
  • Try it: open /system/api-explorer?method=auth.removeOwnPasskey on your hub

Input

z.object({ credentialId: z.string(), reauthToken: ReauthTokenInput.optional() })

Output

z.object({ success: z.literal(true) })

auth.getOwnPasskeySecondFactorPreference

  • Kind: query — GET /trpc/auth.getOwnPasskeySecondFactorPreference
  • Tier: protected — any signed-in principal
  • Source: server/backend/src/api/core/auth.router.ts:1386
  • Try it: open /system/api-explorer?method=auth.getOwnPasskeySecondFactorPreference on your hub

Input

z.void()

Output

SecondFactorPreferenceSchema = z.object({ enabled: z.boolean() })

auth.setOwnPasskeySecondFactorPreference

  • Kind: mutation — POST /trpc/auth.setOwnPasskeySecondFactorPreference
  • Tier: protected — any signed-in principal
  • Source: server/backend/src/api/core/auth.router.ts:1400
  • Try it: open /system/api-explorer?method=auth.setOwnPasskeySecondFactorPreference on your hub

Input

z.object({ enabled: z.boolean() })

Output

SetSecondFactorPreferenceSchema = z.object({ success: z.literal(true) })

auth.listLinkableProviders

  • Kind: query — GET /trpc/auth.listLinkableProviders
  • Tier: protected — any signed-in principal
  • Source: server/backend/src/api/core/auth.router.ts:1468
  • Try it: open /system/api-explorer?method=auth.listLinkableProviders on your hub

Input

z.void()

Output

z.array(z.object({ provider: z.string(), label: z.string() }))
  • Kind: mutation — POST /trpc/auth.beginExternalLink
  • Tier: protected — any signed-in principal
  • Source: server/backend/src/api/core/auth.router.ts:1481
  • Try it: open /system/api-explorer?method=auth.beginExternalLink on your hub

Input

z.object({ provider: z.string().min(1), returnTo: z.string().optional(), reauthToken: ReauthTokenInput.optional() })

Output

z.object({ url: z.string() })
  • Kind: mutation — POST /trpc/auth.completeExternalLink
  • Tier: protected — any signed-in principal
  • Source: server/backend/src/api/core/auth.router.ts:1525
  • Try it: open /system/api-explorer?method=auth.completeExternalLink on your hub

Input

z.object({ code: z.string().min(1).max(256) })

Output

z.object({ outcome: z.enum(['linked', 'conflict', 'expired', 'session']), provider: z.string().optional() })

auth.createBrowserHandoff

  • Kind: mutation — POST /trpc/auth.createBrowserHandoff
  • Tier: protected — any signed-in principal
  • Source: server/backend/src/api/core/auth.router.ts:1556
  • Try it: open /system/api-explorer?method=auth.createBrowserHandoff on your hub

Input

z.object({ destination: z.enum(['account', 'admin']).optional() }).optional()

Output

z.object({ path: z.string(), expiresAt: z.number() })

auth.listOwnExternalIdentities

  • Kind: query — GET /trpc/auth.listOwnExternalIdentities
  • Tier: protected — any signed-in principal
  • Source: server/backend/src/api/core/auth.router.ts:1583
  • Try it: open /system/api-explorer?method=auth.listOwnExternalIdentities on your hub

Input

z.void()

Output

z.array(OwnExternalIdentitySchema)

auth.unlinkOwnExternalIdentity

  • Kind: mutation — POST /trpc/auth.unlinkOwnExternalIdentity
  • Tier: protected — any signed-in principal
  • Source: server/backend/src/api/core/auth.router.ts:1603
  • Try it: open /system/api-explorer?method=auth.unlinkOwnExternalIdentity on your hub

Input

z.object({ provider: z.string().min(1), subject: z.string().min(1) })

Output

z.object({ success: z.boolean() })

auth.listLoginMethods

  • Kind: query — GET /trpc/auth.listLoginMethods
  • Tier: public — no credential needed
  • Source: server/backend/src/api/core/auth.router.ts:1634
  • Try it: open /system/api-explorer?method=auth.listLoginMethods on your hub

Input

z.void()

Output

z.array(PublicLoginMethodSchema).readonly()

auth.getServerName

  • Kind: query — GET /trpc/auth.getServerName
  • Tier: public — no credential needed
  • Source: server/backend/src/api/core/auth.router.ts:1643
  • Try it: open /system/api-explorer?method=auth.getServerName on your hub

Input

z.void()

Output

ServerNameInfoSchema

auth.refreshSession

  • Kind: mutation — POST /trpc/auth.refreshSession
  • Tier: public — no credential needed, limited per client address
  • Source: server/backend/src/api/core/auth-sessions.procedures.ts:123
  • Try it: open /system/api-explorer?method=auth.refreshSession on your hub

Input

z.object({ refreshToken: z.string().min(1).max(512) })

Output

RefreshResultSchema = z.object({ token: z.string(), refreshToken: z.string(), expiresAt: z.number(), sessionId: z.string(), sessionExpiresAt: z.number(), user: z.object({ id: z.string(), username: z.string(), isAdmin: z.boolean() }) })

auth.logout

  • Kind: mutation — POST /trpc/auth.logout
  • Tier: protected — any signed-in principal
  • Source: server/backend/src/api/core/auth-sessions.procedures.ts:173
  • Try it: open /system/api-explorer?method=auth.logout on your hub

Input

z.object({ everywhere: z.boolean().optional() }).optional()

Output

z.object({ success: z.literal(true), revoked: z.number() })

auth.listOwnSessions

  • Kind: query — GET /trpc/auth.listOwnSessions
  • Tier: protected — any signed-in principal
  • Source: server/backend/src/api/core/auth-sessions.procedures.ts:207
  • Try it: open /system/api-explorer?method=auth.listOwnSessions on your hub

Input

z.void()

Output

z.array(LoginSessionSchema)

auth.revokeOwnSession

  • Kind: mutation — POST /trpc/auth.revokeOwnSession
  • Tier: protected — any signed-in principal
  • Source: server/backend/src/api/core/auth-sessions.procedures.ts:216
  • Try it: open /system/api-explorer?method=auth.revokeOwnSession on your hub

Input

z.object({ id: z.string().min(1) })

Output

z.object({ success: z.boolean() })

auth.listSessions

  • Kind: query — GET /trpc/auth.listSessions
  • Tier: admin — an administrator only
  • Source: server/backend/src/api/core/auth-sessions.procedures.ts:230
  • Try it: open /system/api-explorer?method=auth.listSessions on your hub

Input

z.object({ userId: z.string().min(1).optional() }).optional()

Output

z.array(LoginSessionSchema)

auth.revokeSessions

  • Kind: mutation — POST /trpc/auth.revokeSessions
  • Tier: admin — an administrator only
  • Source: server/backend/src/api/core/auth-sessions.procedures.ts:236
  • Try it: open /system/api-explorer?method=auth.revokeSessions on your hub

Input

z.union([z.object({ id: z.string().min(1) }), z.object({ userId: z.string().min(1) })])

Output

z.object({ revoked: z.number() })

auth.cliLoginBegin

  • Kind: mutation — POST /trpc/auth.cliLoginBegin
  • Tier: public — no credential needed, limited per client address
  • Source: server/backend/src/api/core/auth-cli-login.procedures.ts:83
  • Try it: open /system/api-explorer?method=auth.cliLoginBegin on your hub

Input

z.object({ client: ClientLabelInput.optional() }).optional()

Output

z.object({ userCode: z.string(), deviceSecret: z.string(), expiresAt: z.number(), intervalSec: z.number() })

auth.cliLoginPoll

  • Kind: mutation — POST /trpc/auth.cliLoginPoll
  • Tier: public — no credential needed, limited per client address
  • Source: server/backend/src/api/core/auth-cli-login.procedures.ts:96
  • Try it: open /system/api-explorer?method=auth.cliLoginPoll on your hub

Input

z.object({ deviceSecret: z.string().min(1).max(256) })

Output

PollOutputSchema(deps.loginResultSchema)

auth.cliLoginDescribe

  • Kind: query — GET /trpc/auth.cliLoginDescribe
  • Tier: protected — any signed-in principal
  • Source: server/backend/src/api/core/auth-cli-login.procedures.ts:130
  • Try it: open /system/api-explorer?method=auth.cliLoginDescribe on your hub

Input

z.object({ userCode: UserCodeInput })

Output

RequestViewSchema.extend({ approverIp: z.string().nullable() })

auth.cliLoginApprove

  • Kind: mutation — POST /trpc/auth.cliLoginApprove
  • Tier: protected — any signed-in principal
  • Source: server/backend/src/api/core/auth-cli-login.procedures.ts:141
  • Try it: open /system/api-explorer?method=auth.cliLoginApprove on your hub

Input

z.object({ userCode: UserCodeInput, reauthToken: ReauthTokenInput.optional() })

Output

z.object({ ok: z.literal(true) })

auth.cliLoginDeny

  • Kind: mutation — POST /trpc/auth.cliLoginDeny
  • Tier: protected — any signed-in principal
  • Source: server/backend/src/api/core/auth-cli-login.procedures.ts:169
  • Try it: open /system/api-explorer?method=auth.cliLoginDeny on your hub

Input

z.union([ z.object({ userCode: UserCodeInput }), z.object({ requestId: z.string().min(1) }) ])

Output

z.object({ ok: z.literal(true) })

auth.cliLoginPending

  • Kind: query — GET /trpc/auth.cliLoginPending
  • Tier: protected — any signed-in principal
  • Source: server/backend/src/api/core/auth-cli-login.procedures.ts:200
  • Try it: open /system/api-explorer?method=auth.cliLoginPending on your hub

Input

none

Output

z.array(RequestViewSchema)

auth.completeEnrollment

  • Kind: mutation — POST /trpc/auth.completeEnrollment
  • Tier: public — no credential needed
  • Source: server/backend/src/api/core/auth-device-cert.procedures.ts:227
  • Try it: open /system/api-explorer?method=auth.completeEnrollment on your hub

Input

CompleteEnrollmentInputSchema

Output

CompleteEnrollmentResultSchema

auth.getDeviceChallenge

  • Kind: mutation — POST /trpc/auth.getDeviceChallenge
  • Tier: public — no credential needed
  • Source: server/backend/src/api/core/auth-device-cert.procedures.ts:250
  • Try it: open /system/api-explorer?method=auth.getDeviceChallenge on your hub

Input

z.void()

Output

DeviceChallengeResultSchema

auth.loginWithDeviceCertificate

  • Kind: mutation — POST /trpc/auth.loginWithDeviceCertificate
  • Tier: public — no credential needed
  • Source: server/backend/src/api/core/auth-device-cert.procedures.ts:274
  • Try it: open /system/api-explorer?method=auth.loginWithDeviceCertificate on your hub

Input

DeviceProofInputSchema.extend({ refreshable: z.boolean().optional() })

Output

DeviceLoginResultSchema = z.discriminatedUnion('ok', [ z.object({ ok: z.literal(true), token: z.string(), user: z.object({ id: z.string(), username: z.string(), isAdmin: z.boolean() }), expiresAt: z.number().optional(), sessionId: z.string().optional(), sessionExpiresAt: z.number().optional(), refreshToken: z.string().optional(), credentialId: z.string(), certNotAfter: z.number() }), DeviceRefusalSchema ])

auth.renewDeviceCertificate

  • Kind: mutation — POST /trpc/auth.renewDeviceCertificate
  • Tier: public — no credential needed
  • Source: server/backend/src/api/core/auth-device-cert.procedures.ts:329
  • Try it: open /system/api-explorer?method=auth.renewDeviceCertificate on your hub

Input

DeviceProofInputSchema

Output

RenewDeviceCertificateResultSchema

auth.revokeOwnDeviceCertificate

  • Kind: mutation — POST /trpc/auth.revokeOwnDeviceCertificate
  • Tier: public — no credential needed
  • Source: server/backend/src/api/core/auth-device-cert.procedures.ts:357
  • Try it: open /system/api-explorer?method=auth.revokeOwnDeviceCertificate on your hub

Input

DeviceProofInputSchema

Output

RevokeOwnDeviceCertificateResultSchema

auth.listOwnDeviceCredentials

  • Kind: query — GET /trpc/auth.listOwnDeviceCredentials
  • Tier: protected — any signed-in principal
  • Source: server/backend/src/api/core/auth-device-cert.procedures.ts:384
  • Try it: open /system/api-explorer?method=auth.listOwnDeviceCredentials on your hub

Input

z.object({ includeRevoked: z.boolean().optional() }).optional()

Output

z.array(DeviceCredentialSchema)

auth.revokeOwnDeviceCredential

  • Kind: mutation — POST /trpc/auth.revokeOwnDeviceCredential
  • Tier: protected — any signed-in principal
  • Source: server/backend/src/api/core/auth-device-cert.procedures.ts:416
  • Try it: open /system/api-explorer?method=auth.revokeOwnDeviceCredential on your hub

Input

z.object({ id: z.string().min(1) })

Output

z.object({ revoked: z.boolean(), sessionsEnded: z.number().int() })

auth.deviceEnrollProofFromReauth

  • Kind: mutation — POST /trpc/auth.deviceEnrollProofFromReauth
  • Tier: protected — any signed-in principal
  • Source: server/backend/src/api/core/auth-device-cert.procedures.ts:446
  • Try it: open /system/api-explorer?method=auth.deviceEnrollProofFromReauth on your hub

Input

z.object({ reauthToken: ReauthTokenInput })

Output

DeviceEnrollProofSchema

auth.deviceEnrollProofFromHandoff

  • Kind: mutation — POST /trpc/auth.deviceEnrollProofFromHandoff
  • Tier: protected — any signed-in principal
  • Source: server/backend/src/api/core/auth-device-cert.procedures.ts:468
  • Try it: open /system/api-explorer?method=auth.deviceEnrollProofFromHandoff on your hub

Input

z.object({ code: z.string().min(1).max(256), codeVerifier: z.string().min(1).max(256).optional(), state: z.string().min(1).max(256).optional() })

Output

DeviceEnrollProofSchema

auth.enrollSelf

  • Kind: mutation — POST /trpc/auth.enrollSelf
  • Tier: protected — any signed-in principal
  • Source: server/backend/src/api/core/auth-device-cert.procedures.ts:506
  • Try it: open /system/api-explorer?method=auth.enrollSelf on your hub

Input

EnrollSelfInputSchema

Output

CompleteEnrollmentResultSchema

auth.reauthBeginPasskey

  • Kind: mutation — POST /trpc/auth.reauthBeginPasskey
  • Tier: protected — any signed-in principal
  • Source: server/backend/src/api/core/auth-reauth.procedures.ts:92
  • Try it: open /system/api-explorer?method=auth.reauthBeginPasskey on your hub

Input

z.void()

Output

OptionsJsonSchema = z.object({ optionsJSON: z.record(z.string(), z.unknown()) })

auth.reauthenticate

  • Kind: mutation — POST /trpc/auth.reauthenticate
  • Tier: protected — any signed-in principal
  • Source: server/backend/src/api/core/auth-reauth.procedures.ts:108
  • Try it: open /system/api-explorer?method=auth.reauthenticate on your hub

Input

z.union([ z.object({ password: z.string().min(1).max(1024) }), z.object({ passkeyResponse: z.record(z.string(), z.unknown()) }) ])

Output

z.object({ reauthToken: z.string(), expiresAt: z.number(), method: z.enum(['password', 'passkey']) })

auth.listAuthAudit

  • Kind: query — GET /trpc/auth.listAuthAudit
  • Tier: admin — an administrator only
  • Source: server/backend/src/api/core/auth-audit.procedures.ts:32
  • Try it: open /system/api-explorer?method=auth.listAuthAudit on your hub

Input

z.object({ limit: z.number().int().min(1).max(500).optional(), userId: z.string().min(1).optional() }).optional()

Output

z.array(AuthAuditRecordSchema)

auth.mintToken

  • Kind: mutation — POST /trpc/auth.mintToken
  • Tier: protected — any signed-in principal
  • Source: server/backend/src/api/core/auth-tokens.procedures.ts:233
  • Try it: open /system/api-explorer?method=auth.mintToken on your hub

Input

MintTokenInputSchema = z.object({ scopes: z.array(CredentialScopeSchema).min(1).max(MAX_SCOPES), expiresIn: TokenExpiresInSchema, label: z.string().trim().min(1).max(80), reauthToken: ReauthTokenInput.optional(), subjectId: z.string().min(1).optional() })

Output

z.object({ token: z.string(), record: TokenSummarySchema })

auth.listTokens

  • Kind: query — GET /trpc/auth.listTokens
  • Tier: protected — any signed-in principal
  • Source: server/backend/src/api/core/auth-tokens.procedures.ts:250
  • Try it: open /system/api-explorer?method=auth.listTokens on your hub

Input

ListTokensInputSchema = z.object({ label: z.string().trim().min(1).max(80).optional() }).optional()

Output

z.array(TokenSummarySchema)

auth.extendToken

  • Kind: mutation — POST /trpc/auth.extendToken
  • Tier: protected — any signed-in principal
  • Source: server/backend/src/api/core/auth-tokens.procedures.ts:276
  • Try it: open /system/api-explorer?method=auth.extendToken on your hub

Input

ExtendTokenInputSchema = z.object({ id: z.string().min(1), expiresIn: TokenExpiresInSchema })

Output

TokenSummarySchema = z.object({ id: z.string(), subjectId: z.string(), label: z.string(), scopes: z.array(CredentialScopeSchema), createdAt: z.number(), expiresAt: z.number().nullable(), lastUsedAt: z.number().nullable(), revokedAt: z.number().nullable() })

auth.revokeToken

  • Kind: mutation — POST /trpc/auth.revokeToken
  • Tier: protected — any signed-in principal
  • Source: server/backend/src/api/core/auth-tokens.procedures.ts:309
  • Try it: open /system/api-explorer?method=auth.revokeToken on your hub

Input

z.object({ id: z.string().min(1) })

Output

z.object({ success: z.boolean() })

auth.revokeCredentials

  • Kind: mutation — POST /trpc/auth.revokeCredentials
  • Tier: admin — an administrator only
  • Source: server/backend/src/api/core/auth-revoke-credentials.procedures.ts:120
  • Try it: open /system/api-explorer?method=auth.revokeCredentials on your hub

Input

RevokeCredentialsInputSchema = z.object({ ids: z.array(z.string().min(1)).min(1).max(REVOKE_CREDENTIALS_MAX), confirmCount: z.number().int().min(1) }).refine((input) => new Set(input.ids).size === input.ids.length, { message: 'Each id may be listed once', path: ['ids'] })

Output

RevokeCredentialsOutputSchema = z.object({ revoked: z.array(z.string()), skipped: z.array(z.object({ id: z.string(), reason: RevokeSkipReasonSchema })) })