8000 DISABLE_NEW_SSO_USERS set to true breaks SMTP for first time installers · Issue #1218 · linkwarden/linkwarden · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
DISABLE_NEW_SSO_USERS set to true breaks SMTP for first time installers #1218
Open
@veduco

Description

@veduco

Running docker container tag v2.10.2.

Describe the bug
During initial installation, setting DISABLE_NEW_SSO_USERS to true prevents verification emails from being sent.

To Reproduce
If a user

  1. starts with an empty directory, having never used Linkwarden before
  2. builds a .env with these values defined as listed:
    ...
    NEXT_PUBLIC_DISABLE_REGISTRATION=false
    NEXT_PUBLIC_CREDENTIALS_ENABLED=true
    DISABLE_NEW_SSO_USERS=true
    NEXT_PUBLIC_EMAIL_PROVIDER=true
    EMAIL_FROM=linkwarden@example.com
    EMAIL_SERVER=smtp://user:password@host:port
    ...
  1. docker compose up to start the container
  2. attempts to sign up the first user for the first time

the user is unable to complete registration and login because no verification email is sent.
This is because no connection to the SMTP server is attempted as sniffed by tcpdump.
No log message is generated within the container indicating this failure condition.

If the user then

  1. changes DISABLE_NEW_SSO_USERS from true to false
  2. docker compose down/up restarts the container
  3. clicks "Resend Email" or otherwise attempts to login with the existing but unverified account

the connection to the SMTP server is attempted and an email is sent, allowing the user to verify their email address and continue setup/utilization.

I suspect this to be down to this line:


But this is just a theory.

If the user then

  1. changes DISABLE_NEW_SSO_USERS from false to true, mirroring the original configuration
  2. docker compose down/up restarts the container
  3. clicks "Resend Email" or otherwise attempts to login with the existing but unverified account again

the issue does not appear - the verification email is sent and the user can click to verify, eventually successfully logging in.

Expected behavior
For first time installers, DISABLE_NEW_SSO_USERS set to true should not prevent email verifications from being sent.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0