Skip to content

✨ feat: add businessElement and getFetchOptions plumbing to signin page#13382

Merged
tjx666 merged 2 commits intocanaryfrom
feat/turnstile-signin-plumbing
Mar 29, 2026
Merged

✨ feat: add businessElement and getFetchOptions plumbing to signin page#13382
tjx666 merged 2 commits intocanaryfrom
feat/turnstile-signin-plumbing

Conversation

@tjx666
Copy link
Copy Markdown
Member

@tjx666 tjx666 commented Mar 29, 2026

💻 Change Type

  • ✨ feat

🔗 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.

  • Add businessElement slot to SignInEmailStep component
  • Pass getFetchOptions to signIn.social() and signIn.oauth2() calls
  • Add businessElement and getFetchOptions defaults to useBusinessSignin

These are generic plumbing changes — no business logic exposed.

🧪 How to Test

  • No tests needed — purely additive with null/undefined defaults

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 29, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
lobehub Ready Ready Preview, Comment Mar 29, 2026 3:07pm

Request Review

Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We've reviewed this pull request using the Sourcery rules engine

@lobehubbot
Copy link
Copy Markdown
Member

@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
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@tjx666 tjx666 force-pushed the feat/turnstile-signin-plumbing branch from c32df9f to 104ff86 Compare March 29, 2026 14:48
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 29, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 66.89%. Comparing base (4dc3c4e) to head (acf9c04).
⚠️ Report is 2 commits behind head on canary.

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              
Flag Coverage Δ
app 58.46% <ø> (-0.01%) ⬇️
database 96.66% <ø> (ø)
packages/agent-runtime 89.26% <ø> (ø)
packages/context-engine 86.47% <ø> (ø)
packages/conversation-flow 92.36% <ø> (ø)
packages/file-loaders 87.02% <ø> (ø)
packages/memory-user-memory 66.68% <ø> (ø)
packages/model-bank 99.85% <ø> (ø)
packages/model-runtime 84.44% <ø> (ø)
packages/prompts 67.76% <ø> (ø)
packages/python-interpreter 92.90% <ø> (ø)
packages/ssrf-safe-fetch 0.00% <ø> (ø)
packages/utils 90.41% <ø> (ø)
packages/web-crawler 88.82% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
Store 67.03% <ø> (ø)
Services 49.30% <ø> (ø)
Server 67.27% <ø> (-0.01%) ⬇️
Libs 51.03% <ø> (ø)
Utils 91.01% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@tjx666 tjx666 merged commit b6c66db into canary Mar 29, 2026
34 checks passed
@tjx666 tjx666 deleted the feat/turnstile-signin-plumbing branch March 29, 2026 15:15
@lobehubbot
Copy link
Copy Markdown
Member

❤️ 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.

cy948 pushed a commit to cy948/lobe-chat that referenced this pull request Mar 31, 2026
…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
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

Successfully merging this pull request may close these issues.

2 participants