Managing Cookies When Running On Local Host #3361
-
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 https://discord.com/channels/967097582721572934/1153409343568498718 |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 1 reply
-
Maybe you can try the following: You can edit your host file (/etc/hosts) for example: 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. |
Beta Was this translation helpful? Give feedback.
-
I will try changing my host file, thanks for suggesting it.
My application users are in a separate collection from the users that have
access to the CMS
…On Tue, Sep 19, 2023 at 6:43 PM Matthijs Knigge ***@***.***> wrote:
Maybe you can try the following:
You can edit your host file (/etc/hosts) for example:
127.0.0.1. payload.dev
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.
—
Reply to this email directly, view it on GitHub
<#3361 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAEAFGPQNT73V3JBQYDE3YTX3INYDANCNFSM6AAAAAA466SA3I>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Maybe a future plugin idea: Payload Impersonation plugin Would love to have a plugin like this: https://wordpress.org/plugins/user-switching/ |
Beta Was this translation helpful? Give feedback.
-
just using two separate tabs/browsers |
Beta Was this translation helpful? Give feedback.
just using two separate tabs/browsers