2021-08-17 - with Version 9.x, Directus is a Node.js app, with a Laravel version in the pipeline.
Version 8.x is the last working php version of Directus.
Extending Directus User Table
Using Custom User Table
I want to verify a user of my app, against a list of users, stored and administered in Directus.
Initially I wanted to use
directus_users table and the
POST /:project/auth/authenticate endpoint, but it seems weird to mix Directus users with this third party user table.
The docs say:
Users vs. Directus Users Because it comes with auth, permissions, and other features out-of-the-box, many developers want to repurpose Directus Users to manage "users" within their proprietary client application. While this may work in some projects, we recommend creating your own users collection to avoid issues.
So I created a new collection called members with a text field for the unique username/email and a password field.
After reading the docs up and down and search the old issues, I came up with this strategy to verify a user via the API (using the access_token of the Directus Admin):
And in a second step I would post the hash along with the password
Is that the way to do it? I found it nowhere documented. Is there a better way, with just one call?
# Get all top-level fields
# Get all top-level fields and all second-level relational fields
# Get all top-level fields and second-level relational fields within images
# Get only the first_name and last_name fields
# Get all top-level and second-level relational fields, and third-level fields within images.thumbnails