-
-
Notifications
You must be signed in to change notification settings - Fork 11.3k
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
💄 style: Skip NextAuth login page if only one sso provider exists #3400
Conversation
@cy948 is attempting to deploy a commit to the LobeHub Pro Team on Vercel. A member of the Team first needs to authorize it. |
👍 @cy948 Thank you for raising your pull request and contributing to our Community |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3400 +/- ##
==========================================
- Coverage 94.21% 94.21% -0.01%
==========================================
Files 403 403
Lines 25657 25667 +10
Branches 2751 1881 -870
==========================================
+ Hits 24174 24181 +7
- Misses 1483 1486 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
❤️ Great PR @cy948 ❤️ The growth of project is inseparable from user feedback and contribution, thanks for your contribution! If you are interesting with the lobehub developer community, please join our discord and then dm @arvinxx or @canisminor1990. They will invite you to our private developer channel. We are talking about the lobe-chat development or sharing ai newsletter around the world. |
## [Version 1.9.0](v1.8.2...v1.9.0) <sup>Released on **2024-08-05**</sup> #### ✨ Features - **misc**: Skip login page if only one provider exists. <br/> <details> <summary><kbd>Improvements and Fixes</kbd></summary> #### What's improved * **misc**: Skip login page if only one provider exists, closes [#3400](#3400) ([52da1d8](52da1d8)) </details> <div align="right"> [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) </div>
🎉 This PR is included in version 1.9.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
## [Version 1.52.0](v1.51.1...v1.52.0) <sup>Released on **2024-08-05**</sup> #### ✨ Features - **misc**: Skip login page if only one provider exists. <br/> <details> <summary><kbd>Improvements and Fixes</kbd></summary> #### What's improved * **misc**: Skip login page if only one provider exists, closes [lobehub#3400](https://github.com/bentwnghk/lobe-chat/issues/3400) ([52da1d8](52da1d8)) </details> <div align="right"> [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) </div>
## [Version 1.9.0](lobehub/lobe-chat@v1.8.2...v1.9.0) <sup>Released on **2024-08-05**</sup> #### ✨ Features - **misc**: Skip login page if only one provider exists. <br/> <details> <summary><kbd>Improvements and Fixes</kbd></summary> #### What's improved * **misc**: Skip login page if only one provider exists, closes [lobehub#3400](lobehub#3400) ([52da1d8](lobehub@52da1d8)) </details> <div align="right"> [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) </div>
## [Version 1.9.0](lobehub/lobe-chat@v1.8.2...v1.9.0) <sup>Released on **2024-08-05**</sup> #### ✨ Features - **misc**: Skip login page if only one provider exists. <br/> <details> <summary><kbd>Improvements and Fixes</kbd></summary> #### What's improved * **misc**: Skip login page if only one provider exists, closes [lobehub#3400](lobehub#3400) ([52da1d8](lobehub@52da1d8)) </details> <div align="right"> [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) </div>
💻 变更类型 | Change Type
🔀 变更说明 | Description of Change
src/types/serverConfig.tssrc/types/serverConfig.ts
: 增加变量类型定义:oAuthSSOProviders?: string[]
,表示当前nextauth启用的Providers;src/server/globalConfig/index.ts
: 为上述变量定义初始值;src/store/serverConfig/selectors.ts
: 为上述变量增加selector;src/store/user/slices/auth/initialState.ts
: 在客户端UserStore
中增加对应类型定义;src/layout/GlobalProvider/StoreInitialization.tsx
: 初始化store时将上述服务端变量赋值到客户端对应变量;src/store/user/slices/auth/action.ts
: 使用NextAuth登录时,若只有一个 provider ,则跳过 sso 选择页面;📝 补充信息 | Additional Information
需求
fix #1913