new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Better Auth · Plugins · all subjects

scim/hooks

5 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

SCIM hooks run after role checks

The built-in organization role check runs before hooks. Hooks should be used to add stricter rules, not to bypass requiredRole.

SCIM hooks error handling

All SCIM hooks support error handling. Throwing an error in a before hook will prevent the operation from proceeding.

SCIM token generation hook with stricter authorization

The beforeSCIMTokenGenerated hook allows adding stricter authorization rules on top of built-in organization role checks. Example: scim({ beforeSCIMTokenGenerated: async ({ user }) => { if (!approvedScimOperators.has(user.id)) { throw new APIError("FORBIDDEN", { message: "User does not have enough permissions" }); } } })

SCIM beforeSCIMTokenGenerated hook

The beforeSCIMTokenGenerated hook intercepts token generation lifecycle. Parameters: user, member (null for personal connections), scimToken. Can throw errors to prevent token generation. Member is null for personal connections. Add extra restrictions before the token is persisted.

SCIM afterSCIMTokenGenerated hook

The afterSCIMTokenGenerated hook is called after the SCIM token has been persisted. Parameters: user, member, scimToken, scimProvider. Can be useful to send notifications or share the token.

Give your agent this brain