✨ feat: add businessElement and getFetchOptions plumbing to signin page#13382
✨ feat: add businessElement and getFetchOptions plumbing to signin page#13382
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@ONLY-yours - This PR adds extension points (businessElement slot and getFetchOptions) to the signin flow. The primary feature owner is the PR author, so please take a look at this auth/signin change. |
Add extension points to the signin flow so cloud overrides can inject custom UI elements and modify fetch options for social sign-in requests. - Add businessElement slot to SignInEmailStep component - Pass getFetchOptions to signIn.social() and signIn.oauth2() calls - Add businessElement and getFetchOptions defaults to useBusinessSignin
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c32df9ff6f
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| button | ||
| ); | ||
| })} | ||
| {businessElement} |
There was a problem hiding this comment.
Render businessElement outside provider-count gate
businessElement is currently rendered only inside the serverConfigInit && oAuthSSOProviders.length > 0 block, so downstream custom sign-in UI disappears whenever built-in providers are empty. In business deployments that inject their own IdP button via this extension point, users with disableEmailPassword enabled will see only the warning state and no usable sign-in action. The element should be rendered independently of oAuthSSOProviders.length so custom providers still work when no built-in SSO providers are configured.
Useful? React with 👍 / 👎.
c32df9f to
104ff86
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## canary #13382 +/- ##
==========================================
- Coverage 66.90% 66.89% -0.01%
==========================================
Files 1903 1903
Lines 153838 153838
Branches 18392 18392
==========================================
- Hits 102918 102916 -2
- Misses 50800 50802 +2
Partials 120 120
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
❤️ Great PR @tjx666 ❤️ 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. |
…ge (lobehub#13382) * ✨ feat: add businessElement and getFetchOptions plumbing to signin page Add extension points to the signin flow so cloud overrides can inject custom UI elements and modify fetch options for social sign-in requests. - Add businessElement slot to SignInEmailStep component - Pass getFetchOptions to signIn.social() and signIn.oauth2() calls - Add businessElement and getFetchOptions defaults to useBusinessSignin * 🐛 fix: resolve TS error on signIn.social result type with fetchOptions
💻 Change Type
🔗 Related Issue
N/A
🔀 Description of Change
Add extension points to the signin flow so downstream overrides can inject custom UI elements and modify fetch options for social sign-in requests.
businessElementslot toSignInEmailStepcomponentgetFetchOptionstosignIn.social()andsignIn.oauth2()callsbusinessElementandgetFetchOptionsdefaults touseBusinessSigninThese are generic plumbing changes — no business logic exposed.
🧪 How to Test