Skip to content

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

Closed

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').

Activity

  1. linear commented on Apr 23, 2026

    @linear
  2. david-shiko commented on Apr 23, 2026

    @david-shiko
    Author

    What is this?

  3. ComfortablyCoding commented on Jun 12, 2026

    @ComfortablyCoding
    Member

    Fixed by #716

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions