Client
Server
Reference / @open-music-sdk/user-token / tIntakeOptions
Defined in: user-token/src/intake.ts:11
Invalid values throw a TypeError when the handler is created.
readonly store: tUserTokenStore;Defined in: user-token/src/intake.ts:13
Where an accepted token is kept: the store your client's forUser() reads.
readonly userId: (req) =>
| string
| Promise<string | null | undefined>
| null
| undefined;Defined in: user-token/src/intake.ts:19
The signed-in user this request belongs to, from your own session; the token is stored under it. Resolve to nothing when there is no session and the request is answered 401. This is the authentication: whoever it returns, the posted token is stored as theirs, so return the signed-in user from your own session.
Request
| string | Promise<string | null | undefined> | null | undefined