Skip to content

feat: auto-login after admin account setup#24395

Merged
crazywoola merged 2 commits intomainfrom
feat/auto-login-after-setup
Aug 25, 2025
Merged

feat: auto-login after admin account setup#24395
crazywoola merged 2 commits intomainfrom
feat/auto-login-after-setup

Conversation

@laipz8200
Copy link
Copy Markdown
Member

@laipz8200 laipz8200 commented Aug 23, 2025

Summary

  • Implemented automatic login after admin account creation during initial setup
  • Users are now directly redirected to the apps page after setup completion
  • Eliminates the need to manually login with the same credentials just created

Related Issue

Fixes #24394

auto-login.mp4

Implementation Details

The solution is implemented entirely in the frontend by:

  1. After successful admin account setup, automatically calling the login API with the same credentials
  2. Storing the returned access_token and refresh_token in localStorage
  3. Redirecting to /apps instead of /signin
  4. Includes fallback behavior to redirect to signin if auto-login fails

Automatically authenticate the admin user after account creation during
the initial setup process, providing a seamless onboarding experience.

Fixes #24394
@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. 💪 enhancement New feature or request labels Aug 23, 2025
crazywoola
crazywoola previously approved these changes Aug 24, 2025
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Aug 24, 2025
As suggested in PR review, using router.replace prevents users from
navigating back to the setup page after successful authentication
@crazywoola crazywoola merged commit f7416eb into main Aug 25, 2025
9 checks passed
@crazywoola crazywoola deleted the feat/auto-login-after-setup branch August 25, 2025 01:29
@lyzno1 lyzno1 mentioned this pull request Aug 25, 2025
qiqizjl pushed a commit to qiqizjl/dify that referenced this pull request Aug 27, 2025
HarryReidx pushed a commit to HarryReidx/dify that referenced this pull request Sep 1, 2025
@dosubot dosubot bot mentioned this pull request Jan 6, 2026
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

💪 enhancement New feature or request lgtm This PR has been approved by a maintainer size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Auto-login after admin account setup during installation

2 participants