I’m fairly new at all this.
My backend is an Express application with Passport for authentication. My frontend is Vue, and I check for authentication status in the Vue Router using router.beforeEach to grant access to pages that require you to be logged in. To make calls from frontend to backend, I’m using axios and have set ‘withCredentials: true’
Authentication and authorization worked well on localhost. I deployed to AWS (backend as lambda, frontend in S3), and authentication and authorization still worked will on my laptop. I have problems on mobile, though.
Safari on iOS is fine. But in Chrome, when I submit the login form, it appears to authenticate properly and attempts to route me to the next view, but then it sends me back to the login page, so I assume that the authentication check in the router is failing.
I don’t know how to troubleshoot Chrome on iOS directly. So to try to see what’s happening, I’ve modified the login page to display the full response from the backend after submitting the form. I’d also like to display the sessionID cookie from Passport, but I can’t figure out how to access the browser’s cookies.
and also installed vue-cookie and tried
but I’m not able to get anything. Like I said, I’m fairly new to all this. Can someone help me access the cookies so I can display them on the login page?