140 Commits

Author SHA1 Message Date
a05bce4e38 refactor: Simplify OAuth authorization page and component with direct SSO handling 2025-02-21 19:19:11 +08:00
a3e43bf9e1 refactor: Simplify user authorization action and component with direct sign-in method 2025-02-21 18:56:27 +08:00
4254098b53 refactor: Simplify SSO authorization flow by removing OAuth parameter handling 2025-02-21 18:50:05 +08:00
a0026c005d refactor: Streamline SSO and OAuth authorization flow with simplified parameter handling 2025-02-21 18:47:32 +08:00
1b4a988ba2 refactor: Simplify user authorization component and improve error handling 2025-02-21 18:32:59 +08:00
2f848af557 refactor: Improve OAuth and SSO authorization flow with enhanced loading and error handling 2025-02-21 18:27:55 +08:00
86adf32db8 refactor: Enhance OAuth authorization flow with improved parameter handling and loading state 2025-02-21 18:23:47 +08:00
05b8ee3c75 feat: 改进 OAuth 参数存储和重定向机制,使用 cookies 管理临时授权参数 2025-02-21 18:18:45 +08:00
8bcaf1fd89 refactor: 简化 SSO 登录流程,移除 OAuth 参数存储和复杂重定向逻辑 2025-02-21 18:11:50 +08:00
99e833c84e refactor: 重构 SSO 登录流程,改进错误处理和状态管理 2025-02-21 18:05:05 +08:00
0d1228ec30 feat: 优化 OAuth 认证流程,改进参数获取和加载状态管理 2025-02-21 18:00:42 +08:00
178d2af9aa feat: 改进 OAuth 参数存储和处理机制,优化跨页面参数传递 2025-02-21 17:58:58 +08:00
e193568ee8 refactor: 改进 OAuth 参数处理和错误处理机制 2025-02-21 17:54:17 +08:00
1c0aa7e65f refactor: 优化 SSO 和 OAuth 重定向流程,改进参数处理和回调机制 2025-02-21 17:43:21 +08:00
f9c912e8c5 refactor: 重构用户授权流程,简化 OAuth 和 SSO 重定向逻辑 2025-02-21 17:28:14 +08:00
6c8bda6b32 feat: 增加 OAuth 支持,优化用户授权流程,简化参数处理和错误显示 2025-02-21 17:22:56 +08:00
3b47daccee 修复: 即使用户没有提前登录本系统,从第三方应用发起授权请求时也能正确完成整个认证流程 2025-02-21 17:12:53 +08:00
cd24fe93b7 取消错误更改 2025-02-21 17:09:10 +08:00
0da3da33ef 使用原始方法 2025-02-21 16:49:18 +08:00
0c98d52a16 refactor: 更新用户授权组件以使用next-auth进行登录,简化重定向逻辑并优化会话更新 2025-02-21 16:45:52 +08:00
0ef9ae7903 refactor: 优化用户授权组件的错误处理逻辑,简化代码结构 2025-02-21 16:40:42 +08:00
a5a9f2e779 refactor: 简化用户授权组件的登录逻辑,移除不必要的延迟和重定向处理 2025-02-21 16:27:23 +08:00
3f193650d2 docs: 更新README以添加检查点说明;优化用户授权组件的重定向逻辑 2025-02-21 16:20:37 +08:00
2b11972699 登录后跳转, 添加更长的等待时间 2025-02-21 16:11:17 +08:00
3dece6b5df fix: 添加短暂延迟以确保会话更新完成 2025-02-21 15:49:54 +08:00
c535e037fc docs: 更新README以包含项目部署网址和Q58论坛信息;优化用户授权组件的登录回调逻辑 2025-02-21 15:42:40 +08:00
5f196acb4a refactor: 移除不必要的会话更新逻辑以简化导航栏组件 2025-02-21 15:36:47 +08:00
1083416b17 feat: Enhance Discourse SSO authentication with dynamic return URL handling
- Update signIn action to extract and use return_sso_url from SSO parameters
- Modify UserAuthorize component to dynamically retrieve SSO and signature parameters
- Improve error handling and logging in authentication process
- Update README to reflect current project deployment and simplify description
2025-02-21 15:30:25 +08:00
8a7997f5b9 feat: Improve user authorization UI and session management
- Enhance UserAuthorize component with Card-based loading and error states
- Add animated loading spinner and error icon for better user feedback
- Implement router refresh after successful authentication
- Update NavBar to automatically update session on component mount
- Streamline sign-out process with router refresh
2025-02-21 13:42:38 +08:00
f9521d9afb refactor: Simplify OAuth authentication flow and update branding
- Remove complex OAuth parameter handling in UserAuthorize component
- Streamline sign-in process with direct dashboard redirect
- Update UserAuthForm to use simplified branding (Q58 instead of Q58论坛)
- Add session update after successful authentication
2025-02-21 13:32:51 +08:00
a85c15381a 回归原项目 2025-02-21 13:25:05 +08:00
379fceb26b refactor: Improve SSO authentication flow with enhanced error handling and parameter processing
- Update Q58 route to handle dynamic OAuth parameters
- Add error handling and logging for SSO URL generation
- Modify UserAuthForm to preserve and pass OAuth parameters during authentication
- Implement more robust error handling in authentication process
2025-02-21 13:15:53 +08:00
1e519738ea feat: Improve OAuth authorization flow and redirect handling
- Update signIn action to support dynamic redirect after authentication
- Modify Q58 OAuth route to handle dynamic return URL with original parameters
- Refactor UserAuthorize component to support OAuth-specific redirect scenarios
- Add support for preserving and processing OAuth parameters during login
2025-02-21 13:08:42 +08:00
f7d32436b5 fix: Modify OAuth authorization redirect after login
- Update router.push to redirect back to OAuth authorization page
- Preserve original OAuth parameters using window.location.search
- Ensure smooth continuation of OAuth authorization flow after authentication
2025-02-21 12:52:26 +08:00
b5c3d84ec5 fix: Update login redirect path in OAuth authorization page
- Change redirect path from "/login" to "/sign-in" for consistent authentication routing
2025-02-21 12:39:03 +08:00
760bbdbafd feat: Enhance homepage and OAuth authorization with improved design and functionality
- Redesign homepage with modern layout, feature cards, and interactive tabs
- Add Radix UI Tabs component for code example section
- Improve OAuth authorization page with more robust parameter validation
- Refactor Authorizing component with better loading state and error handling
- Optimize authorization code generation and expiration logic
- Update authorization flow to support standard OAuth 2.0 parameters
2025-02-20 03:44:05 +08:00
5a31f79f75 refactor: Update OAuth authorization page to support standard OAuth parameters
- Modify AuthorizeParams interface to align with OAuth 2.0 specification
- Add validation for required OAuth parameters
- Implement parameter transformation and encoding
- Improve error handling for missing or invalid parameters
- Ensure compatibility with standard OAuth authorization flow
2025-02-20 03:21:17 +08:00
f276f28118 fix: Replace router.push with window.location.href in ErrorCard
- Modify error redirection to use window.location.href for full page reload
- Ensure proper error parameter propagation during OAuth authorization
- Maintain consistent error handling behavior across different scenarios
2025-02-20 03:14:38 +08:00
7c05f5f70e feat: Enhance OAuth authorization error handling with ErrorCard
- Add comprehensive error handling for invalid clients, disabled applications, and mismatched redirect URIs
- Implement ErrorCard component to display detailed error messages during OAuth authorization
- Improve user feedback with specific error types and descriptions
- Replace simple error text with structured error handling
2025-02-20 03:13:04 +08:00
a82643ada4 refactor: Simplify OAuth authorization page and component
- Restructure AuthorizePage to handle user authentication and client validation
- Modify Authorizing component to use new authorization action
- Improve error handling with dedicated ErrorCard component
- Streamline authorization flow and parameter handling
- Remove redundant validation checks in favor of centralized authorization logic
2025-02-20 03:09:46 +08:00
493ad7136f refactor: Enhance authorization flow with improved permission checks and user context
- Separate platform and application-level authorization checks
- Use current user session for authorization instead of passing user ID
- Add detailed permission validation with specific error messages
- Simplify authorization record creation and update logic
- Remove redundant client and user checks
2025-02-20 03:03:49 +08:00
3782ec8ca0 添加"授权管理页面" 2025-02-20 02:39:55 +08:00
b01890e2cf refactor: Simplify Authorizing component and remove progress tracking
- Remove unnecessary progress bar and related state management
- Simplify authorization flow with direct async function in useEffect
- Remove unused useCallback and progress tracking logic
- Streamline loading state rendering
- Update loading message to be more concise
2025-02-20 02:30:46 +08:00
1d0fe64fdb feat: Improve OAuth authorization error handling and client validation
- Add comprehensive error handling for OAuth authorization requests
- Implement detailed error redirects for invalid client, redirect URI, and disabled applications
- Update Authorizing component to handle OAuth parameters more robustly
- Refactor client retrieval to select specific fields and improve security
- Enhance error messaging for OAuth authorization flow
2025-02-20 02:24:06 +08:00
bd6b2b747d feat: Add user allowlist and improve client creation validation
- Implement user allowlist feature for client applications
- Add input validation for client creation form
- Handle parsing of allowed users list
- Improve error handling and user feedback during client creation
- Update authorization process to check client enabled status and user permissions
2025-02-20 02:13:06 +08:00
0dd6a3338f refactor: Improve UI and UX for client management and authorization
- Updated client status toggle with Switch component
- Refined admin pages for clients and users with layout improvements
- Enhanced authorization action with more detailed error logging
- Modified dashboard links to point to client list instead of new client page
- Updated client edit form with clearer user input guidance
2025-02-20 02:02:04 +08:00
70e66294e3 feat: Add user access control and client management enhancements
- Introduced `allowedUsers` field to Client model for granular access control
- Implemented user filtering in authorization process
- Updated client edit form with allowed users configuration
- Enhanced dashboard and admin pages with improved user and client management
- Refactored client update and delete API routes
- Added form validation using Zod and react-hook-form
2025-02-20 01:49:52 +08:00
a81fee3f9a feat: Initialize default authorization state with enabled status and timestamp 2025-02-20 01:15:16 +08:00
781d2fc0c2 feat: Add authorization tracking and management features
- Enhanced Authorization model with `enabled` and `lastUsedAt` fields
- Implemented client-side and admin authorization status toggles
- Added comprehensive authorization statistics and recent authorization tracking
- Updated client details pages to display authorization information
- Improved navigation and user experience for managing client authorizations
2025-02-20 01:13:22 +08:00
402295d908 refactor: Improve AccessToken creation method with explicit data handling 2025-02-20 00:33:58 +08:00