How Do I
Scope by owner
Resolve forms through route-scoped owner context.
Use scoped routes when the same package should serve multiple tenants or owners.
formforgeClient
export default defineNuxtConfig({
formforgeClient: {
scopedRoutes: {
user: {
route: '/users/{user}',
param: 'user'
},
team: {
route: '/teams/{team}',
param: 'team'
}
},
defaultScope: 'user',
scopeParams: {
user: 'owner.slug'
}
}
})
When to use it
- You need tenant-aware API calls.
- You want route params to resolve ownership automatically.
- You want the backend to build links from the owner context.
Keep the backend as the final authority on ownership. The client should only pass the scope values that the server expects.