Skip to content

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

Open
go-pkgz/auth
#241
@nmattia

Description

@nmattia

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

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions