mirror of
https://github.com/yusing/godoxy.git
synced 2026-01-14 07:33:36 +01:00
The JWT authentication cannot be used normally with the sample configuration. #34
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @JoJenH on GitHub (Feb 7, 2025).
It looks like the cookie was only assigned at 127.0.0.1.I'm not good at Web development, so I didn't know what was wrong.
@yusing commented on GitHub (Feb 7, 2025):
This is because the frontend is trying to access API via "127.0.0.1:8888", and the NextJS rewrite function doesn't pass the "Host" field to the API.
But this should not cause any issue. When the "Domain" value in the cookie is invalid, it will be dropped, and then browser will set it to the current domain like "godoxy.domain.com".
You can simply ignore this error message. If this causes any issue, please let me know.
@JoJenH commented on GitHub (Feb 7, 2025):
Thank you. After a proper login, the server returns the correct set-cookie, but the frontend does not store it, resulting in a redirect to the login page. I will check again and if there is a problem, I will give feedback again.
@yusing commented on GitHub (Feb 7, 2025):
Could you remove everything and do setup again? Also please DM me the
.envon Discord to see if you have set anything wrong.@JoJenH commented on GitHub (Feb 7, 2025):
The
.envfile:The
config.ymlfile:The
docker-compose.yamlfile:Server returns a cookie:
But client does not store it and send it to server in check request:
So I get a 401 status code, and return to login page.
@yusing commented on GitHub (Feb 7, 2025):
Check if there is a token cookie in Storage > Cookies?
@JoJenH commented on GitHub (Feb 7, 2025):
No.
@JoJenH commented on GitHub (Feb 7, 2025):
Edge, Google Chrome and FireFox.
@yusing commented on GitHub (Feb 7, 2025):
I see the issue, as said in the Wiki, authentication only works in HTTPs. set-cookie have "Secure: true" property for security measure.
@JoJenH commented on GitHub (Feb 7, 2025):
Thanks. My mistake.