[GH-ISSUE #1639] New user through OAuth cannot log in #1021

Closed
opened 2026-03-02 11:54:27 +03:00 by kerem · 3 comments
Owner

Originally created by @Mladia on GitHub (Jun 20, 2025).
Original GitHub issue: https://github.com/karakeep-app/karakeep/issues/1639

Describe the Bug

I am trying to log with a user through Authentik into my karakeep instance. This is a user, which doesn't yet exit in Karakeep. After loggin in, I receive this error:

2025-06-20T09:00:00.435Z info: [feed] Scheduling feed refreshing jobs ...
d [TRPCError]: User settings not found
    at /app/apps/web/.next/server/chunks/6815.js:1:41820
    at async X.h.middlewares (/app/apps/web/.next/server/chunks/269.js:4:46337)
    at async F (/app/apps/web/.next/server/chunks/269.js:7:68)
    at async G (/app/apps/web/.next/server/chunks/269.js:4:45731)
    at async F (/app/apps/web/.next/server/chunks/269.js:7:68)
    at async F (/app/apps/web/.next/server/chunks/269.js:7:68)
    at async F (/app/apps/web/.next/server/chunks/269.js:7:68)
    at async G (/app/apps/web/.next/server/chunks/269.js:4:46537)
    at async /app/apps/web/.next/server/chunks/269.js:7:5476
    at async Promise.all (index 1) {
  cause: undefined,
  code: 'NOT_FOUND',
  digest: '4237581454'
}

When I inspect the users through the Admin settings (from my admin user), I see the new user, but I suspect the automatic configururation of this new user does not work properly.

Steps to Reproduce

services:
  web:
    image: ghcr.io/karakeep-app/karakeep:release
    restart: unless-stopped
    container_name: karakeep
    volumes:
      - /dir:/data
    env_file:
      - .env
    environment:
      DATA_DIR: /data # DON'T CHANGE THIS
      MEILI_ADDR: http://meilisearch:7700
      BROWSER_WEB_URL: http://chrome:9222
      NEXTAUTH_URL: "https://XXXX"

      OAUTH_CLIENT_ID: XXXX
      OAUTH_CLIENT_SECRET: "XXXXXX"
      OAUTH_WELLKNOWN_URL: "https://authentik.XXXX/application/o/karakeep/.well-known/openid-configuration"
      OAUTH_PROVIDER_NAME: "authentik"
      OAUTH_ALLOW_DANGEROUS_EMAIL_ACCOUNT_LINKING: "true"
      DISABLE_PASSWORD_AUTH: true
      DISABLE_SIGNUPS: true
  • Open Karakeep page.
  • Go to Sign in with authentik. Log in with a user, non-existing for Karakeep.
  • Receive the error

Expected Behaviour

The non-existing user to be created and to log in properly

Screenshots or Additional Context

Image

Image

Image

Device Details

All browsers

Exact Karakeep Version

v0.25.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 @Mladia on GitHub (Jun 20, 2025). Original GitHub issue: https://github.com/karakeep-app/karakeep/issues/1639 ### Describe the Bug I am trying to log with a user through Authentik into my karakeep instance. This is a user, which doesn't yet exit in Karakeep. After loggin in, I receive this error: ``` 2025-06-20T09:00:00.435Z info: [feed] Scheduling feed refreshing jobs ... d [TRPCError]: User settings not found at /app/apps/web/.next/server/chunks/6815.js:1:41820 at async X.h.middlewares (/app/apps/web/.next/server/chunks/269.js:4:46337) at async F (/app/apps/web/.next/server/chunks/269.js:7:68) at async G (/app/apps/web/.next/server/chunks/269.js:4:45731) at async F (/app/apps/web/.next/server/chunks/269.js:7:68) at async F (/app/apps/web/.next/server/chunks/269.js:7:68) at async F (/app/apps/web/.next/server/chunks/269.js:7:68) at async G (/app/apps/web/.next/server/chunks/269.js:4:46537) at async /app/apps/web/.next/server/chunks/269.js:7:5476 at async Promise.all (index 1) { cause: undefined, code: 'NOT_FOUND', digest: '4237581454' } ``` When I inspect the users through the Admin settings (from my admin user), I see the new user, but I suspect the automatic configururation of this new user does not work properly. ### Steps to Reproduce ``` services: web: image: ghcr.io/karakeep-app/karakeep:release restart: unless-stopped container_name: karakeep volumes: - /dir:/data env_file: - .env environment: DATA_DIR: /data # DON'T CHANGE THIS MEILI_ADDR: http://meilisearch:7700 BROWSER_WEB_URL: http://chrome:9222 NEXTAUTH_URL: "https://XXXX" OAUTH_CLIENT_ID: XXXX OAUTH_CLIENT_SECRET: "XXXXXX" OAUTH_WELLKNOWN_URL: "https://authentik.XXXX/application/o/karakeep/.well-known/openid-configuration" OAUTH_PROVIDER_NAME: "authentik" OAUTH_ALLOW_DANGEROUS_EMAIL_ACCOUNT_LINKING: "true" DISABLE_PASSWORD_AUTH: true DISABLE_SIGNUPS: true ``` - Open Karakeep page. - Go to Sign in with authentik. Log in with a user, non-existing for Karakeep. - Receive the error ### Expected Behaviour The non-existing user to be created and to log in properly ### Screenshots or Additional Context ![Image](https://github.com/user-attachments/assets/b4d1051d-f85c-4256-8f39-8d78449ce025) ![Image](https://github.com/user-attachments/assets/e6520961-2cb3-4d21-946a-1bdd9c7d90d0) ![Image](https://github.com/user-attachments/assets/cb3a8fc5-2374-4fe4-b4c9-673b85ad09e7) ### Device Details All browsers ### Exact Karakeep Version v0.25.0 ### Have you checked the troubleshooting guide? - [x] I have checked the troubleshooting guide and I haven't found a solution to my problem
kerem 2026-03-02 11:54:27 +03:00
Author
Owner

@Fmstrat commented on GitHub (Jun 20, 2025):

I am hitting this as well.

<!-- gh-comment-id:2992465767 --> @Fmstrat commented on GitHub (Jun 20, 2025): I am hitting this as well.
Author
Owner

@Fmstrat commented on GitHub (Jun 20, 2025):

@Mladia To get around this temporarily, I did the following:

sqlite3 db.db

Then get the user id from the user table:

SELECT * FROM user;

Then add default settings for that user:

INSERT INTO userSettings (userId) VALUES ('<insert id>');

This got me moving. I stopped Karakeep before and restarted it after.

<!-- gh-comment-id:2992506767 --> @Fmstrat commented on GitHub (Jun 20, 2025): @Mladia To get around this temporarily, I did the following: ``` sqlite3 db.db ``` Then get the user id from the user table: ```sql SELECT * FROM user; ``` Then add default settings for that user: ```sql INSERT INTO userSettings (userId) VALUES ('<insert id>'); ``` This got me moving. I stopped Karakeep before and restarted it after.
Author
Owner

@MohamedBassem commented on GitHub (Jun 21, 2025):

Yeah, this is a bug I'm fixing in #1583

<!-- gh-comment-id:2993477039 --> @MohamedBassem commented on GitHub (Jun 21, 2025): Yeah, this is a bug I'm fixing in #1583
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#1021
No description provided.