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

No way to login on login page #588

Open
mathieukergosien opened this issue Apr 29, 2024 · 1 comment
Open

No way to login on login page #588

mathieukergosien opened this issue Apr 29, 2024 · 1 comment
Labels
question Further information is requested

Comments

@mathieukergosien
Copy link

mathieukergosien commented Apr 29, 2024

Is your question related to a problem or code? Please describe.
There is no username or password fields on the login page.

Describe what you've tried to solve this question
Fresh installation via docker compose
Signed up and created a new account (received user created success notification)
On the sign in page there is no fields where to enter username and password.

Also, the XHR call to http://10.100.0.9:5852/api/v1/auth/session returns an empty Json object.

Tried to add NEXT_PUBLIC_CREDENTIALS_ENABLED=true to my env vars but didn't work.

In the linkwarden-linkwarden-1 container logs I only see this query getting called regularly:

[1] prisma:query SELECT "public"."Link"."id", "public"."Link"."name", "public"."Link"."type", "public"."Link"."description", "public"."Link"."collectionId", "public"."Link"."url", "public"."Link"."textContent", "public"."Link"."preview", "public"."Link"."image", "public"."Link"."pdf", "public"."Link"."readable", "public"."Link"."lastPreserved", "public"."Link"."importDate", "public"."Link"."createdAt", "public"."Link"."updatedAt" FROM "public"."Link" WHERE ("public"."Link"."url" IS NOT NULL AND ("public"."Link"."image" IS NULL OR "public"."Link"."image" = $1 OR "public"."Link"."pdf" IS NULL OR "public"."Link"."pdf" = $2 OR "public"."Link"."readable" IS NULL OR "public"."Link"."readable" = $3)) ORDER BY "public"."Link"."id" DESC LIMIT $4 OFFSET $5

Tried browsers: Firefox, Chrome, Edge

Include any code or screenshots (if applicable)
Here are my .env vars:

NEXTAUTH_SECRET=asecret
NEXTAUTH_URL=http://10.100.0.9:5852/api/v1/auth
NEXT_PUBLIC_CREDENTIALS_ENABLED=true

# Manual installation database settings
#DATABASE_URL=postgresql://user:password@localhost:5432/linkwarden

# Docker installation database settings
POSTGRES_PASSWORD=anothersecret

and my compose.yaml:

services:
  postgres:
    image: postgres:16-alpine
    env_file: .env
    restart: always
    volumes:
      - /media/Stockage/Data/Linkwarden/Postgres:/var/lib/postgresql/data
  linkwarden:
    env_file: .env
    environment:
      - DATABASE_URL=postgresql://postgres:${POSTGRES_PASSWORD}@postgres:5432/postgres
    restart: always
    # build: . # uncomment this line to build from source
    image: ghcr.io/linkwarden/linkwarden:latest # comment this line to build from source
    ports:
      - 5852:3000
    volumes:
      - /media/Stockage/Data/Linkwarden/Data:/data/data
    depends_on:
      - postgres

And here is my login page:

323056207-cfb358ed-1c2a-44a9-8042-42731249a950

Additional context
N/A

@mathieukergosien mathieukergosien added the question Further information is requested label Apr 29, 2024
@coreyaboy
Copy link

I was experiencing this exact same problem. Did a Docker install, but adjusted for using an existing database server.

My solution was enabling NEXT_PUBLIC_CREDENTIALS_ENABLED=true in my .env file.

I see that you already tried this, so maybe it'd be helpful if I am very specific about how I enabled that setting. I am using the sample .env file as is, nothing excluded. All I did was put the word "true" after the equal sign on line 16, which already contains that variable, with no value.

I believe that your problem might be related to something in your .yaml file or your .env file.

My best guess is that you are also using the sample .env file, and you typed out "NEXT_PUBLIC_CREDENTIALS_ENABLED=true" on line 3, immediately after the two NEXTAUTH_ lines. If you did this, and you are using the sample .env file, the NEXT_PUBLIC_CREDENTIALS_ENABLED variable is going to get un-set by line 16 of your .env file.

Attached is a copy of my YAML and ENV file, with everything I changed highlighted, as a screenshot because I am a barbarian. Hope it helps you figure this one out.

As a side note, I believe the install instructions should maybe include a mention of needing to enable this variable, as it seems to be necessary to get basic functionality out. Or I am overlooking something, which wouldn't surprise me.

image

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

No branches or pull requests

2 participants