Right before serving any request, it writes the same sessionid with CSRF token across multiple domains (pre-defined in an env var), so that you get logged-in once and for all.
We have multiple subdomains for this app, like: DOMAIN.com, admin.DOMAIN.com, api.DOMAIN.com
No, 10x engineers never feel helpless 😂
Just kidding...
I had once to deal with cross domains cookies sharing.
The idea was signing in multiple subdomain names at the same time (without asking the user to click signin button everytime).
I felt so depressed for a whole weak; I tried tons of solutions... Nothing worked!
A whole weak till I wrote a middleware to share cookies across multiple subdomains... It worked perfectly 💪
Tho I'm never touching that code, EVER!
Here is the middleware:
github.com/coretabs/dorm-portal/bl...
Right before serving any request, it writes the same sessionid with CSRF token across multiple domains (pre-defined in an env var), so that you get logged-in once and for all.
Yep subdomains (been edited, thx)... and no, it won't be enough 😁
I don't remember what was the problem I ran into after using the main domain trick (adding a dot).
What is "10x engineers"? I heard it a little. Is that kind of trends?
An engineer that is 10 times better or more productive than your normal engineer. A unicorn. A rock-star dev. A ninja.
More like a Ninja?
Fixed it.