hyperlog-core / hyperlog-backend

Backend for hyperlog
0 stars 0 forks source link

Fix #25: Setup JWT-cookie #46

Closed nikochiko closed 4 years ago

nikochiko commented 4 years ago

Fixes #25

nikochiko commented 4 years ago

@BrainBuzzer Just to be sure, could you check if this is working on your side?

BrainBuzzer commented 4 years ago

It works, but there's a tiny problem. For front-end to work correctly, which is served on a different endpoint than the API endpoint of the server, cookies don't work correctly. And cookies are domain specific, so it won't work, unless we manage to find some way to set cookies on multiple domains.

nikochiko commented 4 years ago

Ah I see, Then how about making a redirect to a page on the backend which will set the cookie for the backend domain? (like was done for /connect_github) I'm not sure if that cookie can be used later on?

BrainBuzzer commented 4 years ago

That won't work. We'll need some other way to publish the cookie.

If backend is hosted on a different subdomain, we'll need to set the cookie to the main domain. I guess that would work the best.

nikochiko commented 4 years ago

Right. I will close this PR and the issue now since changes on the backend won't be required. Feel free to reopen if this needs a rediscussion.