This PR fixes a bug where the session cookies were not getting set correctly and the redirect was not working after login.
The problem was fixed by moving the cookie logic from the server to the client and handling cookies locally. This removed unnecessary requests to the frontend server and prevented a plethora of race conditions with useEffect hooks.
Fixes #406
Type of change
Please select the option that best describes the changes made:
[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] Documentation update
Changes
Handle cookies locally with js-cookies instead of remotely with next/navigation
Removed unnecessary API calls
Removed setTimeouts on redirects which were only necessary because of race conditions
Description
This PR fixes a bug where the session cookies were not getting set correctly and the redirect was not working after login. The problem was fixed by moving the cookie logic from the server to the client and handling cookies locally. This removed unnecessary requests to the frontend server and prevented a plethora of race conditions with useEffect hooks.
Fixes #406
Type of change
Please select the option that best describes the changes made:
Changes
js-cookies
instead of remotely withnext/navigation