Replies: 2 comments 12 replies
-
|
Let me convert this to discussion, I feel this is more a configuration issue than a bug. Could you please post logs you're getting on the problem? It's nearly impossible to help you based just on text description. |
Beta Was this translation helpful? Give feedback.
-
|
There's no If you want to generate tokens externally and have remark42 accept them, you need to match the exact token format it uses: {
"iss": "remark42",
"aud": "local",
"exp": 1766345532,
"iat": 1766345232,
"jti": "some-unique-id",
"user": {
"name": "User Name",
"id": "provider_userid",
"picture": "https://example.com/avatar.png"
}
}Key points:
You can debug remark42-generated and yours JWT tokens using something like https://www.jwt.io. Example for anonymous user on https://remark42.com/demo/:
The built-in auth providers (anonymous, email, oauth) handle all this internally. If you need custom integration, you'll have to generate tokens matching this exact format. See tests in |
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to integrate Remark42 with JWT authentication, but I keep getting 401 Unauthorized errors when posting comments, even though the JWT token is correctly generated on the backend using the official Remark42 JWT algorithm and claims.
Context
Correct secret
Proper claims (sub, aud, exp, iat, etc.)
Algorithm compatible with Remark42 (HS256)
Despite this, any request requiring authentication (e.g. POST /api/v1/comment) returns:
401 UnauthorizedWhat works
What does not work
Remark42 configuration (Docker)
Question
Is there any additional requirement for JWT authentication that is not clearly documented?
For example:
Any clarification or working example would be greatly appreciated. Thank you
Beta Was this translation helpful? Give feedback.
All reactions