I have my payloadCMS running on port 3100 and my nuxt client app running on port 3000. I am running everything locally on localhost.
Whenever I log in to the admin console it drops a new payload-token cookie which then overwrites the payload-token cookie for the currently logged-in user making it difficult to work in CMS and test my application locally
Is there a solution to this?
Thanks... after a couple of early stumbles I am getting the hang of PayloadCMS and it is pretty awesome
just using two separate tabs/browsers
Maybe you can try the following:
You can edit your host file (/etc/hosts) for example:
Open your admin panel on http://payload.dev:3100 and point the frond end to http://localhost:3000.
I think this way the cookies won't mix.
Also, a solution is to open up an incognito window.
And maybe good practice to handle the admin user like a normal user in the frond end, then there is no need to log in with two separate accounts.
Ahh I feel you! Had that problem also a while back. So my solution was an incognito window.
Maybe a future plugin idea: Payload Impersonation plugin
Would love to have a plugin like this: https://wordpress.org/plugins/user-switching/