How to configure scopes
import { defineScopes } from '@opencrvs/toolkit/scopes'
const scopes = defineScopes([{
type: 'record.search',
options: {
event: ['birth'],
placeOfEvent: 'administrativeArea'
}
}]) // ['type=record.search&placeOfEvent=administrativeArea&event=birth']{
"scope": [
"type=record.search&placeOfEvent=administrativeArea&event=birth",
],
"userType": "user",
"role": "REGISTRATION_AGENT",
"iat": 1778663757,
"exp": 1779268557,
"aud": [
"opencrvs:events-user",
],
"iss": "opencrvs:auth-service",
"sub": "783a5bbc-d0f0-4fce-a65e-2afc868d2e41"
}How scope options are evaluated
Using multiple scopes for the same scope type
Last updated