Skip to content

Bug - wrong docs example. Authenticate filter context is missing services and schema #641

@david-shiko

Description

@david-shiko

directus V 11.17.3.
Tutorial URL: Validating Third-Party JWTs in Directus
Description:
The tutorial is missing critical information regarding Just-in-Time (JIT) user provisioning.
When trying to create a user inside the authenticate filter, developers face two issues:
context.services is undefined:
In the authenticate filter, the context object does not contain services. This makes it impossible to use UsersService as one would expect in a Directus extension.
context.schema is null:
The schema object in the filter context is null during this stage. Any attempt to use a service (e.g., usersService.createOne()) fails with:
TypeError: Cannot read properties of null (reading 'collections').

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions