GithubHelp home page GithubHelp logo

Comments (14)

bryantgillespie avatar bryantgillespie commented on June 14, 2024 1

Well aware there are a few issues with the auth and how cookies are stored. Will have a look at this when I get a bit of time 👍

from nuxt3-directus-starter.

BlackDahlia313 avatar BlackDahlia313 commented on June 14, 2024 1

Exactly how I did it in my PR.

But I am moving onto using a Module now.

from nuxt3-directus-starter.

bryantgillespie avatar bryantgillespie commented on June 14, 2024 1

I'll probably end up refactoring the Directus plugin and the auth based on the new SDK once released.

from nuxt3-directus-starter.

BlackDahlia313 avatar BlackDahlia313 commented on June 14, 2024 1

Or maybe we can fix this using the new SDK?

thats what we are doing for our site. This starter kit was a good reference to learn from. ;)

from nuxt3-directus-starter.

bryantgillespie avatar bryantgillespie commented on June 14, 2024 1

Really happy to see some new Nuxt examples being developed :)

👍

Looking at the code, is the recommended approach now to use a module for auth?

Going to be a bit before I've got time to dig back into this starter, but you might have a look at this module for Nuxt that another community member - @becem-gharbi put together.
https://github.com/becem-gharbi/nuxt-directus

from nuxt3-directus-starter.

BlackDahlia313 avatar BlackDahlia313 commented on June 14, 2024

Well aware there are a few issues with the auth and how cookies are stored. Will have a look at this when I get a bit of time 👍

Hey! The auth.ts is totally fine :)

All that was needed was to import onmounted from vue and than use onmounted to call the user data.

#25

from nuxt3-directus-starter.

Loosie94 avatar Loosie94 commented on June 14, 2024

Hi @BlackDahlia313 I tried your pull-request locally, but unfortunately this didn't seem to fix the issue. I am still getting the error and keep signing out.

from nuxt3-directus-starter.

M-GRV avatar M-GRV commented on June 14, 2024

Well aware there are a few issues with the auth and how cookies are stored. Will have a look at this when I get a bit of time 👍

Good to know! I was looking around and it seems onmounted might be the way

Hi @BlackDahlia313 I tried your pull-request locally, but unfortunately this didn't seem to fix the issue. I am still getting the error and keep signing out.

Im assuming you mean for the protected pages using the middleware. That needs an update as well. The patch is only for the auth component. and works when refreshing the homepage to keep you logged in.

The middleware itself needs some love.

from nuxt3-directus-starter.

Loosie94 avatar Loosie94 commented on June 14, 2024

@M-GRV How did you fix that? What did you adjust in the middleware/auth.js? Thanks

from nuxt3-directus-starter.

Loosie94 avatar Loosie94 commented on June 14, 2024

Or maybe we can fix this using the new SDK?

from nuxt3-directus-starter.

bryantgillespie avatar bryantgillespie commented on June 14, 2024

Or maybe we can fix this using the new SDK?

thats what we are doing for our site. This starter kit was a good reference to learn from. ;)

Glad to hear it. If you haven't seen it already - there's this Nuxt project we rolled out last week as well to use as reference / inspiration.
https://github.com/directus-community/agency-os

Haven't got a ton of documentation on it yet and will be doing some content around it soon – but it does have a lot of more advanced / interesting bits in there like dynamic forms / dynamic og images / etc.

from nuxt3-directus-starter.

dnndev avatar dnndev commented on June 14, 2024

Really happy to see some new Nuxt examples being developed :)

Looking at the code, is the recommended approach now to use a module for auth?

from nuxt3-directus-starter.

Loosie94 avatar Loosie94 commented on June 14, 2024

I have created a pretty large app with this boilerplate, so really happy with that. Only issue for me is the authentication each time I refresh. But will keep an eye out for upcoming changes and the new SDK.

from nuxt3-directus-starter.

BlackDahlia313 avatar BlackDahlia313 commented on June 14, 2024

Really happy to see some new Nuxt examples being developed :)

👍

Looking at the code, is the recommended approach now to use a module for auth?

Going to be a bit before I've got time to dig back into this starter, but you might have a look at this module for Nuxt that another community member - @becem-gharbi put together. https://github.com/becem-gharbi/nuxt-directus

Highly recommend this module even tho I decided to build from the SDK directly. The dev is very responsive.

from nuxt3-directus-starter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.