subdomain setup react -- 2

Job Description:

im creating mern app which requires dynamic unlimited subdomains like [login to view URL] for this if write any thing before localhost it gives me error invalid host header.

To achieve this, I have added the line


in my .env file. which is not a good idea.

When a user logs in at localhost:3000, cookies are created and the user is authenticated. If the user is registered with a specific company, they should be redirected to [login to view URL] while remaining logged in. However, upon redirecting to the subdomain, all cookies that were created on localhost are lost and the user is redirected to the login page again. I expected the cookies to persist on the subdomain and enable the user to remain logged in. Can someone please assist me with this issue?

Habilidades: React.js, MERN Stack, Node.js, Express JS

Sobre o Cliente:
( 0 comentários ) Faisalabad, Pakistan

ID do Projeto: #36274284

6 freelancers estão ofertando em média $136 nesse trabalho


The reason why the cookies are lost upon redirecting to the subdomain is because cookies are domain-specific, meaning they are only accessible on the domain and its subdomains that created them. Since your app is runni Mais

$30 USD in 2 dias
(1 Comentário)

Hi Greetings! We are team of software developers. We have big team of around 1500 software developers all over the world associated with us. We have developers working on almost all the technologies. We will assign yo Mais

$250 USD in 7 dias
(0 Comentários)

hello Thank for your job posting I just read your job description and I think it's a great fit for your project. Please look forward to the best beautiful results. I've done similar things in the past With my rich expe Mais

$140 USD in 7 dias
(0 Comentários)

Hello, I have encountered similar problems on past projects and I'm happy to work with you on this one. To solve this issue, we need to modify the domain and path of the cookie so that it can be accessed by pages on t Mais

$140 USD in 7 dias
(0 Comentários)

Hii there. I have worked on mern as my full time opportunities. As i am the professional one. I will complete your task in your budgets and on time. Trust me and moves one step . You will feel so excited. Thank you.

$35 USD in 7 dias
(0 Comentários)