Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SendJWTHeader leads to {"error":"failed to get token"} #1877

Open
nmattia opened this issue Dec 20, 2024 · 0 comments
Open

SendJWTHeader leads to {"error":"failed to get token"} #1877

nmattia opened this issue Dec 20, 2024 · 0 comments

Comments

@nmattia
Copy link

nmattia commented Dec 20, 2024

I'm not sure how to make send-jwt-header work. I'm enabling it as an env var:

      - AUTH_SEND_JWT_HEADER=true

but unfortunately after going through the GitHub auth flow, I end up on this page (https://remark42.example.com/auth/github/callback?code=...&state=...)

{"error":"failed to get token"}

This seems to come from AuthHandler which reads either a cookie or a header (which should get set in LoginHandler).

It looks like frontend support was added for send-jwt-header though it's unclear to me how this works when redirects are used (AFAICT the fetcher.ts module is not actually being used in this case).

Any help appreciated!

Note: I'm trying to enable send-jwt-header because -- as far as I understand -- it should allow me to have remark42 on a different domain than my website (and not rely on cookies which don't seem to work too well inside iframes on Safari due to SameSite not being supported).


EDIT: feel free to play around with https://comments.nmattia.com/web/, I have send-jwt-header currently enabled

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant