0

I have front end - x.sameDomain.io. and a back-end y.sameDomain.io. It basically I use for signup/signin and some other basic queries and this backens sends a http only cookie to the front-end.

Recently I have created another bakc-end z.sameDomain.io in aws lambda. Now the problem is whenever a user sends a request to y.sameDomain.io the cookie authenticates the user. But since there is a new backend z.sameDomain.io, now I am confused how I may authenticate users in z.sameDomain.io.

Is there a way I can login using y.sameDomain.io but both the back-end will recognize me? I am new to this multi back-end system and not sure how resolve this issue?

Blockchain Kid
  • 315
  • 2
  • 9
  • Does this answer your question? [Share cookie between subdomain and domain](https://stackoverflow.com/questions/18492576/share-cookie-between-subdomain-and-domain) – luk2302 Dec 05 '22 at 10:07
  • No, as your mentioned post only answers how to send cookie from backend to a frontend. But I am asking how to authenticate two different backend for a partivular user. I don't think it is possible to send cookie as a response to frontend and then as a request from fronend to other backend. – Blockchain Kid Dec 06 '22 at 06:40
  • Yes, you can do just that if you follow exactly what the duplicate shows you to do: set the cookie domain to just sameDomain.io – luk2302 Dec 06 '22 at 08:16

0 Answers0