TypeScript API / laikacms/auth / mintPersonalAccessToken
Function: mintPersonalAccessToken()
ts
function mintPersonalAccessToken(input, deps): MintPatResult;Mints a new PAT: generates the opaque secret, hashes it for storage, and builds the record consumers persist. scopes must be a non-empty subset of the granting user's own scopes; enforcing "PATs issue a subset of a user's scopes" is the caller's job (it needs the requesting user's scopes), this function only refuses structurally invalid input.
Parameters
| Parameter | Type |
|---|---|
input | MintPatInput |
deps | MintPatDeps |