nuxt-auth-utils icon indicating copy to clipboard operation
nuxt-auth-utils copied to clipboard

API Authentication

Open nabeelio opened this issue 6 months ago • 3 comments

Hi,

So, I'm trying to get some tests working, but in the meantime, I'm trying to hit the API with an API client. I'm setting the nuxt-session cookie, but it's not finding the user. I'm a bit lost on whether the cookie auth is correct, or we should be using some sort of JWT? I'm using AppWrite and create a jwt that I'm setting into the session, but that's separate from a jwt that would be for the nuxt session.

Am I doing something incorrectly, here?

Thanks!!

nabeelio avatar May 26 '25 21:05 nabeelio

Can you share examples ?

alexandre-hallaine avatar May 27 '25 04:05 alexandre-hallaine

I think maybe I'm not clearly asking my question. I'm writing another API (in c#). How do I generate a JWT to send to that API for authentication?

Because right now it seems like everything is done with a cookie, even the authentication to the nuxt API routes

nabeelio avatar May 27 '25 04:05 nabeelio

Looking forward to have JWT style authentication in this package. I am trying to add API support to my app but cookies is not reliable, I can use my own JWT but this time it mismatches with requireUserSession method, as there is no way to middleware this.

arshx86 avatar Sep 26 '25 19:09 arshx86