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

Click Setting up an admin account but back to login page immediately #13024

Closed
5 tasks done
lixjohn opened this issue Jan 24, 2025 · 4 comments
Closed
5 tasks done

Click Setting up an admin account but back to login page immediately #13024

lixjohn opened this issue Jan 24, 2025 · 4 comments

Comments

@lixjohn
Copy link

lixjohn commented Jan 24, 2025

Self Checks

  • 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 (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

0.15.2

Cloud or Self Hosted

Self Hosted

Steps to reproduce

  1. Deploy Dify with following command (no change for any configurations)
    cd dify
    cd docker
    cp .env.example .env
    docker compose up -d
  2. First time to visit install page http://myip/install and add user, it works.
  3. Go go login page, add new user - click Setting up an admin account or type http://myip/install dirctly
  4. System back to login page immediately (I can see install page displayed but redirect to login page in 1 second)

Please let me know any log I should provide.

✔️ Expected Behavior

System should stays in install page and able to add new user.

❌ Actual Behavior

No response

@dosubot dosubot bot added cloud When the version is cloud and it is a bug report 🐞 bug Something isn't working labels Jan 24, 2025
Copy link

dosubot bot commented Jan 24, 2025

Hey @lixjohn! 👋 I'm here to help you with any bugs, questions, or contributions you have for Dify. Let's get this issue sorted out!

I found a similar unsolved discussion titled "Install(signup) page redirected to signin page after changing the default nginx port" which might be related to your issue [1].

Regarding your issue, it seems like the system is redirecting you back to the login page when you try to set up an admin account. This could be related to session management or configuration settings. Here are a few things you might want to check:

  1. OAuth Configuration: Ensure that your OAuth providers (e.g., GitHub, Google) are correctly configured. Missing client IDs or secrets can cause authentication issues [2].

  2. CORS Settings: Verify that your CORS settings in the .env file are correctly configured to allow requests from your frontend to the backend. Incorrect CORS settings can lead to redirect issues [3].

  3. Docker Environment: Check the Docker environment settings, especially the URLs and ports in the .env file. Ensure that they match your deployment environment and that there are no conflicts with other services [3].

  4. Logs and Debugging: Enable debug mode in your Docker setup to get more detailed logs, which might help identify the issue. Look for any error messages related to authentication or session management [3].

If these steps don't resolve the issue, providing logs from the Docker containers might help in diagnosing the problem further.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@lixjohn
Copy link
Author

lixjohn commented Jan 25, 2025

I did check the unsolved discussion before I submitted this issue but they are different, I did not change any settings. And I can create account first time.
Back to your suggestion:

  1. I could login by first user but could not add new user beacuse this issue, so I don't think it is OAuth issue.
  2. The system work normlly, I can create and execute flow correctly.
  3. Same as 2
  4. Could you please give me instructions about which log file I should provide for diagnosing ?
    Thanks.

Copy link

dosubot bot commented Jan 25, 2025

To diagnose the issue further, you should check the logs for any errors or warnings related to authentication or session management. Here are the steps to access the relevant log files:

  1. Locate the Log Files: By default, Dify's logs are stored in the local storage directory mounted to the container. You can find them at ./volumes/app/storage on your host machine. Additionally, logs are written to a file specified by the LOG_FILE environment variable, which defaults to /app/logs/server.log inside the container [1].

  2. Access the Logs: You can access the logs by either:

    • Navigating to the ./volumes/app/storage directory on your host machine and opening the log files directly.
    • Executing a command inside the running Docker container to view the logs. You can do this by running:
      docker exec -it <container_name> cat /app/logs/server.log
      Replace <container_name> with the name of your Dify container.
  3. Enable Debug Mode: If the logs do not provide enough information, consider enabling debug mode to get more detailed logs. You can do this by setting the LOG_LEVEL environment variable to DEBUG in your .env file and then restarting the Docker containers.

Review the logs for any error messages or stack traces that occur around the time you attempt to set up a new admin account. This information can help pinpoint the cause of the redirection issue.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@langgenius langgenius deleted a comment from jmanhype Jan 25, 2025
@langgenius langgenius deleted a comment from jmanhype Jan 25, 2025
@crazywoola crazywoola removed the cloud When the version is cloud and it is a bug report label Jan 25, 2025
@crazywoola
Copy link
Member

crazywoola commented Jan 25, 2025

This is an expected behavior.
You can have one admin user for self hosted version only. Please see our open source license. If you wan to have multi-tenancy deployment please reach out to [email protected].

@crazywoola crazywoola removed the 🐞 bug Something isn't working label Jan 25, 2025
@langgenius langgenius deleted a comment from jmanhype Jan 25, 2025
@langgenius langgenius deleted a comment from jmanhype Jan 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants