Intevel / nuxt-directus

🐰 Easily integrate Directus to your Nuxt application.
https://nuxt-directus.de/
MIT License
275 stars 53 forks source link

Why isn't the registration using the correct Directus way? #282

Open or2e opened 5 days ago

or2e commented 5 days ago

Hi, I looked through the discussion thread and didn't find a similar question

Thanks for the great module!

I have a question.

Why does the register||createUser function directly create a user without using the great Directus functionality out of the box?

/users/register

/users/register/verify-email

At the same time, the requestPasswordReset method uses a similar Directus mechanism with verification


Some example ```ts const register = async (data: DirectusRegisterCredentials & { verification_url: string }): Promise => { return await directus('/users/register', { method: 'POST', body: data, }) } const verifyEmail = async (token: string): Promise => { return await directus('/users/register/verify-email', { method: 'GET', params: { token, }, }) } ```

So we can use the boxed mechanism for user registration verification (sending an email)

Intevel commented 5 days ago

Feel free to make a PR 😉