Dify login issues #21636

Closed
opened 2026-02-21 20:13:35 -05:00 by yindo · 4 comments
Owner

Originally created by @shy20221121 on GitHub (Jan 14, 2026).

Originally assigned to: @hyoban on GitHub.

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report, otherwise it will be closed.
  • 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.11.3

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Image

After entering my username and password and clicking login, nothing happened.
need to refresh the login page to into workspace.

✔️ Expected Behavior

Login is working normally

Actual Behavior

No response

Originally created by @shy20221121 on GitHub (Jan 14, 2026). Originally assigned to: @hyoban on GitHub. ### Self Checks - [x] I have read the [Contributing Guide](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) and [Language Policy](https://github.com/langgenius/dify/issues/1542). - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report, otherwise it will be closed. - [x] 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.11.3 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce <img width="796" height="556" alt="Image" src="https://github.com/user-attachments/assets/ca05f3c2-b76d-48cd-909c-36c0e5dda656" /> After entering my username and password and clicking login, nothing happened. need to refresh the login page to into workspace. ### ✔️ Expected Behavior Login is working normally ### ❌ Actual Behavior _No response_
yindo added the 🐞 bug label 2026-02-21 20:13:35 -05:00
yindo closed this issue 2026-02-21 20:13:35 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Jan 14, 2026):

This login issue is known and tracked in the repo, but there’s no official fix yet. Based on the code and docs, the most common causes are frontend redirect logic, environment variable misconfiguration, or cookie/session issues in Docker setups.

Here’s what to check:

  • Make sure both frontend and backend use HTTPS (even self-signed is fine for local), or browsers may block cookies and break login redirects (source).
  • Leave COOKIE_DOMAIN empty (do not set it to localhost), or cookies may not be recognized (source).
  • Backend CORS config must allow credentials and set Access-Control-Allow-Origin to your frontend’s exact address (not *) (source).
  • Don’t run frontend and backend on localhost with different ports (like 3000/5000); use the same domain/port if possible (source).
  • Check SECRET_KEY and SESSION_SECRET_KEY in your .env/docker-compose—they must be set and match (source).
  • Unset INTERNAL_FILES_URL and set FILES_URL to your host’s LAN IP and port (not localhost), then restart Docker. Also, make sure Docker port mapping exposes the API port to your host (e.g., 0.0.0.0:5001->5001/tcp) (source).
  • Use browser dev tools to check for errors in the console or network tab when you click login. If you see 401s or missing cookies, it’s likely a config or CORS/cookie issue.

The frontend expects a valid redirect_url and successful login response to trigger navigation. If any step fails, you’ll see no redirect and need to refresh manually (source).

If you’ve checked all the above and still see the issue, try upgrading to the latest Dify version, as there have been improvements to authentication and error handling, though no direct fix for this specific bug is mentioned yet.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

Chat with Dosu Open in Cursor Join Discord Share on X

@dosubot[bot] commented on GitHub (Jan 14, 2026): <!-- Answer --> This login issue is known and tracked in the repo, but there’s no official fix yet. Based on the code and docs, the most common causes are frontend redirect logic, environment variable misconfiguration, or cookie/session issues in Docker setups. Here’s what to check: - Make sure both frontend and backend use HTTPS (even self-signed is fine for local), or browsers may block cookies and break login redirects ([source](https://github.com/langgenius/dify-docs/issues/521)). - Leave COOKIE_DOMAIN empty (do not set it to localhost), or cookies may not be recognized ([source](https://github.com/langgenius/dify-docs/issues/521)). - Backend CORS config must allow credentials and set Access-Control-Allow-Origin to your frontend’s exact address (not *) ([source](https://github.com/langgenius/dify-docs/issues/521)). - Don’t run frontend and backend on localhost with different ports (like 3000/5000); use the same domain/port if possible ([source](https://github.com/langgenius/dify-docs/issues/521)). - Check SECRET_KEY and SESSION_SECRET_KEY in your .env/docker-compose—they must be set and match ([source](https://github.com/langgenius/dify-docs/issues/521)). - Unset INTERNAL_FILES_URL and set FILES_URL to your host’s LAN IP and port (not localhost), then restart Docker. Also, make sure Docker port mapping exposes the API port to your host (e.g., 0.0.0.0:5001->5001/tcp) ([source](https://github.com/langgenius/dify-docs/issues/471#issuecomment-3344601972)). - Use browser dev tools to check for errors in the console or network tab when you click login. If you see 401s or missing cookies, it’s likely a config or CORS/cookie issue. The frontend expects a valid redirect_url and successful login response to trigger navigation. If any step fails, you’ll see no redirect and need to refresh manually ([source](https://github.com/langgenius/dify/blob/01f17b7ddc5378f6fc8b49c4879a5ab492f6309d/web/app/(shareLayout)/webapp-signin/components/mail-and-password-auth.tsx#L47-L176)). If you’ve checked all the above and still see the issue, try upgrading to the latest Dify version, as there have been improvements to authentication and error handling, though no direct fix for this specific bug is mentioned yet. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/56e6e525-dafa-445b-981a-bb7c872c8f6f?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/56e6e525-dafa-445b-981a-bb7c872c8f6f?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/56e6e525-dafa-445b-981a-bb7c872c8f6f?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/56e6e525-dafa-445b-981a-bb7c872c8f6f?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/56e6e525-dafa-445b-981a-bb7c872c8f6f?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/56e6e525-dafa-445b-981a-bb7c872c8f6f?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/56e6e525-dafa-445b-981a-bb7c872c8f6f?feedback_type=other)</sup> [![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/6088a4f4-073a-43f3-b3d4-4f06fb0c05a0/ask?utm_source=github)&nbsp;[![Open in Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=This%20login%20issue%20is%20known%20and%20tracked%20in%20the%20repo%2C%20but%20there%E2%80%99s%20no%20official%20fix%20yet.%20Based%20on%20the%20code%20and%20docs%2C%20the%20most%20common%20causes%20are%20frontend%20redirect%20logic%2C%20environment%20variable%20misconfiguration%2C%20or%20cookie/session%20issues%20in%20Docker%20setups.%0A%0AHere%E2%80%99s%20what%20to%20check%3A%0A%0A-%20Make%20sure%20both%20frontend%20and%20backend%20use%20HTTPS%20%28even%20self-signed%20is%20fine%20for%20local%29%2C%20or%20browsers%20may%20block%20cookies%20and%20break%20login%20redirects%C2%A0%28%5Bsource%5D%28https%3A//github.com/langgenius/dify-docs/issues/521%29%29.%0A-%20Leave%20COOKIE_DOMAIN%20empty%20%28do%20not%20set%20it%20to%20localhost%29%2C%20or%20cookies%20may%20not%20be%20recognized%C2%A0%28%5Bsource%5D%28https%3A//github.com/langgenius/dify-docs/issues/521%29%29.%0A-%20Backend%20CORS%20config%20must%20allow%20credentials%20and%20set%20Access-Control-Allow-Origin%20to%20your%20frontend%E2%80%99s%20exact%20address%20%28not%20%2A%29%C2%A0%28%5Bsource%5D%28https%3A//github.com/langgenius/dify-docs/issues/521%29%29.%0A-%20Don%E2%80%99t%20run%20frontend%20and%20backend%20on%20localhost%20with%20different%20ports%20%28like%203000/5000%29%3B%20use%20the%20same%20domain/port%20if%20possible%C2%A0%28%5Bsource%5D%28https%3A//github.com/langgenius/dify-docs/issues/521%29%29.%0A-%20Check%20SECRET_KEY%20and%20SESSION_SECRET_KEY%20in%20your%20.env/docker-compose%E2%80%94they%20must%20be%20set%20and%20match%C2%A0%28%5Bsource%5D%28https%3A//github.com/langgenius/dify-docs/issues/521%29%29.%0A-%20Unset%20INTERNAL_FILES_URL%20and%20set%20FILES_URL%20to%20your%20host%E2%80%99s%20LAN%20IP%20and%20port%20%28not%20localhost%29%2C%20then%20restart%20Docker.%20Also%2C%20make%20sure%20Docker%20port%20mapping%20exposes%20the%20API%20port%20to%20your%20host%20%28e.g.%2C%200.0.0.0%3A5001-%3E5001/tcp%29%C2%A0%28%5Bsource%5D%28https%3A//github.com/langgenius/dify-docs/issues/471%23issuecomment-3344601972%29%29.%0A-%20Use%20browser%20dev%20tools%20to%20check%20for%20errors%20in%20the%20console%20or%20network%20tab%20when%20you%20click%20login.%20If%20you%20see%20401s%20or%20missing%20cookies%2C%20it%E2%80%99s%20likely%20a%20config%20or%20CORS/cookie%20issue.%0A%0AThe%20frontend%20expects%20a%20valid%20redirect_url%20and%20successful%20login%20response%20to%20trigger%20navigation.%20If%20any%20step%20fails%2C%20you%E2%80%99ll%20see%20no%20redirect%20and%20need%20to%20refresh%20manually%C2%A0%28%5Bsource%5D%28https%3A//github.com/langgenius/dify/blob/01f17b7ddc5378f6fc8b49c4879a5ab492f6309d/web/app/%28shareLayout%29/webapp-signin/components/mail-and-password-auth.tsx%23L47-L176%29%29.%0A%0AIf%20you%E2%80%99ve%20checked%20all%20the%20above%20and%20still%20see%20the%20issue%2C%20try%20upgrading%20to%20the%20latest%20Dify%20version%2C%20as%20there%20have%20been%20improvements%20to%20authentication%20and%20error%20handling%2C%20though%20no%20direct%20fix%20for%20this%20specific%20bug%20is%20mentioned%20yet.)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify/issues/30977)
Author
Owner

@jzymx50 commented on GitHub (Jan 14, 2026):

same here

@jzymx50 commented on GitHub (Jan 14, 2026): same here
Author
Owner

@fatelei commented on GitHub (Jan 14, 2026):

Self Checks

  • I have read the Contributing Guide and Language Policy.[x] This is only for bug report, if you would like to ask a question, please head to Discussions.[x] I have searched for existing issues search for existing issues, including closed ones.[x] I confirm that I am using English to submit this report, otherwise it will be closed.[x] 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)[x] Please do not modify this template :) and fill in all the required fields.

Dify version

1.11.3

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Image After entering my username and password and clicking login, nothing happened. need to refresh the login page to into workspace.

✔️ Expected Behavior

Login is working normally

Actual Behavior

No response

ok,i found this issue

@fatelei commented on GitHub (Jan 14, 2026): > ### Self Checks > * [x] I have read the [Contributing Guide](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) and [Language Policy](https://github.com/langgenius/dify/issues/1542).[x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general).[x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones.[x] I confirm that I am using English to submit this report, otherwise it will be closed.[x] 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)[x] Please do not modify this template :) and fill in all the required fields. > > ### Dify version > 1.11.3 > > ### Cloud or Self Hosted > Self Hosted (Docker) > > ### Steps to reproduce > <img alt="Image" width="796" height="556" src="https://private-user-images.githubusercontent.com/118727564/535490310-ca05f3c2-b76d-48cd-909c-36c0e5dda656.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NjgzODE0MjQsIm5iZiI6MTc2ODM4MTEyNCwicGF0aCI6Ii8xMTg3Mjc1NjQvNTM1NDkwMzEwLWNhMDVmM2MyLWI3NmQtNDhjZC05MDljLTM2YzBlNWRkYTY1Ni5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwMTE0JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MDExNFQwODU4NDRaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1mNzRlZmUwNWE1YjAwYTY3YzVhZjIwMWNkZGRhN2Q2ZGQ3NzM0MDMzYmNkMGI3NDA0ZjNmYTIwNTZmMGM2ZWM2JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.gSNBu0YTpWASmwj72LrcnqsjuQyOjpppXFysXnEl4IQ"> > After entering my username and password and clicking login, nothing happened. need to refresh the login page to into workspace. > > ### ✔️ Expected Behavior > Login is working normally > > ### ❌ Actual Behavior > _No response_ ok,i found this issue
Author
Owner

@hyoban commented on GitHub (Jan 14, 2026):

If your password is correct, you may already be logged in; try refreshing the page.

@hyoban commented on GitHub (Jan 14, 2026): If your password is correct, you may already be logged in; try refreshing the page.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#21636