[GH-ISSUE #2190] OAuth Fails with "id_token detected in the response, you must use client.callback() instead of client.oauthCallback()" #1339

Open
opened 2026-03-02 11:56:38 +03:00 by kerem · 1 comment
Owner

Originally created by @gorootde on GitHub (Nov 29, 2025).
Original GitHub issue: https://github.com/karakeep-app/karakeep/issues/2190

Describe the Bug

When logging in to karakeep, the login fails and displays the following error:

On UI (login Screen): OAuth login failed: OAuthCallback
In Logs: id_token detected in the response, you must use client.callback() instead of client.oauthCallback()

IDP is Authelia

Steps to Reproduce

  1. navigate to karakeep login screen
  2. Click on "Sign in with Authelia"
  3. See the error

Expected Behaviour

Login works as it did in older versions <= 0.28.0 (My config is unchanged)

Screenshots or Additional Context

web-1  | [next-auth][error][OAUTH_CALLBACK_ERROR] 
web-1  | https://next-auth.js.org/errors#oauth_callback_error id_token detected in the response, you must use client.callback() instead of client.oauthCallback() {
web-1  |   error: Error [OAuthCallbackError]: id_token detected in the response, you must use client.callback() instead of client.oauthCallback()
web-1  |       at X.oauthCallback (.next/server/chunks/2992.js:36:4844)
web-1  |       at async c (.next/server/chunks/2992.js:80:223346)
web-1  |       at async Object.l (.next/server/chunks/2992.js:80:267919)
web-1  |       at async g (.next/server/chunks/2992.js:80:50417)
web-1  |       at async a (.next/server/chunks/2992.js:80:213138)
web-1  |       at async e.length.t (.next/server/chunks/2992.js:80:214581) {
web-1  |     code: undefined
web-1  |   },
web-1  |   providerId: 'custom',
web-1  |   message: 'id_token detected in the response, you must use client.callback() instead of client.oauthCallback()'
web-1  | }

Device Details

No response

Exact Karakeep Version

0.29.0

Have you checked the troubleshooting guide?

  • I have checked the troubleshooting guide and I haven't found a solution to my problem
Originally created by @gorootde on GitHub (Nov 29, 2025). Original GitHub issue: https://github.com/karakeep-app/karakeep/issues/2190 ### Describe the Bug When logging in to karakeep, the login fails and displays the following error: On UI (login Screen): `OAuth login failed: OAuthCallback` In Logs: `id_token detected in the response, you must use client.callback() instead of client.oauthCallback()` IDP is Authelia ### Steps to Reproduce 1. navigate to karakeep login screen 2. Click on "Sign in with Authelia" 3. See the error ### Expected Behaviour Login works as it did in older versions <= 0.28.0 (My config is unchanged) ### Screenshots or Additional Context ``` web-1 | [next-auth][error][OAUTH_CALLBACK_ERROR] web-1 | https://next-auth.js.org/errors#oauth_callback_error id_token detected in the response, you must use client.callback() instead of client.oauthCallback() { web-1 | error: Error [OAuthCallbackError]: id_token detected in the response, you must use client.callback() instead of client.oauthCallback() web-1 | at X.oauthCallback (.next/server/chunks/2992.js:36:4844) web-1 | at async c (.next/server/chunks/2992.js:80:223346) web-1 | at async Object.l (.next/server/chunks/2992.js:80:267919) web-1 | at async g (.next/server/chunks/2992.js:80:50417) web-1 | at async a (.next/server/chunks/2992.js:80:213138) web-1 | at async e.length.t (.next/server/chunks/2992.js:80:214581) { web-1 | code: undefined web-1 | }, web-1 | providerId: 'custom', web-1 | message: 'id_token detected in the response, you must use client.callback() instead of client.oauthCallback()' web-1 | } ``` ### Device Details _No response_ ### Exact Karakeep Version 0.29.0 ### Have you checked the troubleshooting guide? - [x] I have checked the troubleshooting guide and I haven't found a solution to my problem
Author
Owner

@XTREEMMAK commented on GitHub (Dec 4, 2025):

Had this same issue but using Authentik. What seemed to work for me is updating this in the .env file:

#OLD
#OAUTH_WELLKNOWN_URL=https://<your_fqdn>.com/application/o/hoarder/

#NEW
OAUTH_WELLKNOWN_URL=https://<your_fqdn>.com/application/o/hoarder/.well-known/openid-configuration

I'm being lazy and not updating my names from the old hoarder to karakeep, however make sure to also update in .env if you're like me:

#OLD 
HOARDER_VERSION=release

#NEW
KARAKEEP_VERSION=release
<!-- gh-comment-id:3612933155 --> @XTREEMMAK commented on GitHub (Dec 4, 2025): Had this same issue but using Authentik. What seemed to work for me is updating this in the .env file: ``` #OLD #OAUTH_WELLKNOWN_URL=https://<your_fqdn>.com/application/o/hoarder/ #NEW OAUTH_WELLKNOWN_URL=https://<your_fqdn>.com/application/o/hoarder/.well-known/openid-configuration ``` I'm being lazy and not updating my names from the old hoarder to karakeep, however make sure to also update in .env if you're like me: ``` #OLD HOARDER_VERSION=release #NEW KARAKEEP_VERSION=release ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/karakeep#1339
No description provided.