Back to Pocketbase

Interface requireAuth

static/jsvm/interfaces/apis.requireAuth.html

latest983 B
Original Source

Interface requireAuth

Hierarchy

RequireAuth middleware requires a request to have a valid record Authorization header.

The auth record could be from any collection. You can further filter the allowed record auth collections by specifying their names.

Example:

apis.RequireAuth() // any auth collection apis.RequireAuth("_superusers", "users") // only the listed auth collectionsCopy

Parameters

Rest ...optCollectionNames: string[]

Returns hook.Handler<RequestEvent>

Settings

Member Visibility

  • Inherited

Theme

OSLightDark

Generated using TypeDoc