1 Risposta
- Più recenti
- Maggior numero di voti
- Maggior numero di commenti
0
I found the issue, apparently it was not related to AWS but to the way I set the cookie containing the JWT token that I'm using to make requests to the backend.
The issue was that the cookie was not saved on the browser when it got back with the login response and the private route that I'm using was redirecting me to the login page since it didn't find the cookie (as if I was not logged in). Locally it worked, but on the Elastic BeanStalk instance it didn't save the cookie since the connection was not HTTPS.
To overcome the issue and be able to save the cookie on the AWS instance, I sent it from the backend using a Set-Cookie header and also used the read-only property credentials: 'include' on each request I make (including the login one).
con risposta 4 mesi fa
Contenuto pertinente
- AWS UFFICIALEAggiornata 3 anni fa
- AWS UFFICIALEAggiornata 2 mesi fa
- AWS UFFICIALEAggiornata 2 anni fa
- AWS UFFICIALEAggiornata un mese fa