subasraj / flashpost-support

Flashpost is a lightweight Rest API Client Extension for Visual Studio Code.
MIT License
12 stars 0 forks source link

UnauthenticatedError: authentication invalid #19

Closed MahmoudHossameldin closed 10 months ago

MahmoudHossameldin commented 10 months ago

I'm working on authorized content retrieval. I have a JWT cookie for the authentication. Using Postman or Thunder Client, the content is retrieved successfully after logging in. Using Flashpost, I get an error about the invalidity of authentication after logging in.

subasraj commented 10 months ago

Please give me more details and may be some screenshots that can explain the issue

MahmoudHossameldin commented 10 months ago

I think it's better if you run the project and test it on your local machine?, you can clone it from here: https://github.com/john-smilga/mern-jobify-v2 add the NODE_ENV, PORT, MONGO_URL, JWT_SECRET, JWT_EXPIRES_IN environment variables in a .env file, then "npm install" then "nodemon server", register using post request "https://localhost:PORT-NO/api/v1/auth/register" (provide json object with "name", "lastName", "email", "password", "location") then login with "email" and "password" to get the cookie then get request "https://localhost:PORT/api/v1/users/current-user" and this last one gets an error with your extension but works with alternatives.

subasraj commented 10 months ago

@MahmoudHossameldin I have fixed the issue. Please delete all Flashpost Cookies and try again by updating to the latest version. And don't forget to write a review for my extension.

image
MahmoudHossameldin commented 10 months ago

It works now. Thank you