Open gelinger777 opened 2 years ago
If I am right - localhost:3000
and cookie are not good friends. If your backend is not on localhost also.
Use token from response body:
nuxt.config.ts
auth: { strategies: { local: { token: { property: 'access_token', // name of field from server response required: true, type: 'Bearer', maxAge: 60 * 2 }, }}}
Dear @steklopod , the problem is that the API does not return ANY Token. It just sets the cookie and all other requests you have to do with that cookie . There is no Token at all.
Same issue for me 👋
I think here we should add the bug label
Hi Everybody. I am trying to authenticate by cookie strategy on a API which let's say reachable at https://app.somedomain.xyz/api/v2/
I have a nuxt running on my localhost:3000.
So the API Sets a HostOnly Cookie and gives no Tokens No bearers etc...
Is there any chance that the cookie will be saved by nuxt and reused during the next call? Or I have to try to make some fake subdomain locally like https://fakesub..somedomain.xyz locally via /etc/hosts so that it will work?
There are no Tokens sent back by API so I don't know how to make it work at least for development purposes.
My Strategy looks like this
I have read many things about your module and I am totally confused by the story that you were not supporting the HttpOnly cookie, then you support it , etc...
Any help and clearance would be appreciated...