Biscuit
Using modelValue inside a nested div instead of the wrapping element.
I have an input and I am applying its modelValue inside of it. The problem is that modelValue come has a prop and I can't update its value. So I created a ref out of the modelValue and I am using as such.
I just want to make sure I am doing the things properly, I wonder if there is a better approach to it. It's working btw
9 replies
A composable that requires access to the Nuxt instance was called outside of a plugin,
I have two middlewares.
control-access
is going to redirect the user to home if there's a valid jwt token. auth
is going to redirect the user to /login if the token is not valid and I can't retrieve a new one.
I am storing the accessToken
using a cookie useCookie('token')
. This is handled by a composable called useAccessToken
. So basically the pages call the middlewares that call this composable.
I am getting the following error
here my files
3 replies
Nuxt nuxt/auth basic auth
I did this like I were coding for a react app, I feel like I am doing extra work. I tried using
nuxt/auth
but it seems to only work with providers and not simple servers requests. Every tutorial online is using a provider for authentication.
I have a server that works with basic auth, and I am just not able to make my nuxt app consume the api.
note: As for now, I am not using this nuxt/auth
.
I am using refresh/access tokens, whenever the page is refreshed the http-only cookie (containing the refresh token) should be sent in the request made to /refresh-token
, but the jid
token is not being added to the request.
I am using cookies to keep the current accessToken, I'd like to have it in memory instead but it seems that using cookies to store it is the way to go.
I am quite lost, just take a look at the login page, middlewares and authStore. If you people have a project that's making a request to a custom auth-server let me know
https://github.com/doubleyooz/nuxt-gighub1 replies