Skip to content

Expose additionalData in SignUp and SignIn render props - #119

Merged
ThaminduDilshan merged 1 commit into
thunder-id:mainfrom
Sadeesha-Sath:signup-render-props-additional-data
Oct 16, 2026
Merged

ThaminduDilshan merged 1 commit into
thunder-id:mainfrom
Sadeesha-Sath:signup-render-props-additional-data

Conversation

@Sadeesha-Sath

@Sadeesha-Sath Sadeesha-Sath commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Purpose

A consumer that renders sign-up or sign-in through render props (React children function / Vue default scoped slot) has no way to read the current step's additionalData. The default UI already uses it (e.g. source lookups for KEY_VALUE_LIST, such as account-linking prompts), but custom UIs like a SignUpBox can't. This exposes it in both sign-up and sign-in so the two stay consistent. Nuxt re-uses the Vue component and forwards its slot; the Next.js SignUp now forwards children to BaseSignUp so Next.js consumers can use render props too.

Approach

  • Add additionalData: Record<string, unknown> to BaseSignUpRenderProps and BaseSignInRenderProps in React and Vue. Sign-up reads it from the current flow step's data.additionalData; sign-in passes through its existing additionalData prop.
  • Default it to {} (as SignIn and BaseAcceptInvite already do), so consumers don't need a null check.
  • Forward children in the Next.js SignUp.
  • Additive, so no breaking change.

Related Issues

  • N/A

Related PRs

Checklist

  • Followed the contribution guidelines.
  • Manual test round performed and verified.
  • Documentation provided. (Add links if there are any)
  • Tests provided. (Add links if there are any)
    • Unit Tests
    • Integration Tests
  • Breaking changes. (Fill if applicable)
    • Breaking changes section filled.
    • breaking change label added.
  • Cross-SDK parity. Exactly one of parity/prs-raised or parity/prs-not-needed added.
    • If parity/prs-raised, the port links are posted as a reply on the parity check's comment.

Security checks

  • Followed secure coding standards.
  • Confirmed that this PR doesn't commit any keys, passwords, tokens, usernames, or other secrets.

Summary by CodeRabbit

  • New Features
    • Sign-in and sign-up custom render content in React and Vue can now access additional data from the current flow step.
    • The Next.js sign-in and sign-up components now support custom child content.

@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

🔀 Cross-SDK feature parity, no ports needed

This pull request is labelled parity/prs-not-needed: nothing here has to ship in the other ThunderID SDKs. If that changes, swap the label for parity/prs-raised.

@coderabbitai

coderabbitai Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: thunder-id/javascript-sdks/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 73e6400c-ea10-47d1-a9c7-4bf46a2e8355
📥 Commits

Reviewing files that changed from the base of the PR and between 573a034 and 26068d6.

📒 Files selected for processing: 3
  • packages/nextjs/src/client/components/presentation/SignIn/SignIn.tsx
  • packages/react/src/components/presentation/auth/SignIn/__tests__/BaseSignIn.test.tsx
  • packages/vue/src/__tests__/components/sign-in.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

📝 Walkthrough

React and Vue sign-in and sign-up render APIs expose additionalData from the current flow. Tests verify that render-prop children and scoped slots receive the data. Next.js SignIn accepts children, and Next.js SignUp renders children inside BaseSignUp.

Changes: Auth render APIs

Layer / File(s) Summary
Expose flow additional data
packages/react/src/components/presentation/auth/SignIn/BaseSignIn.tsx, packages/react/src/components/presentation/auth/SignUp/BaseSignUp.tsx, packages/react/src/components/presentation/auth/SignIn/__tests__/BaseSignIn.test.tsx, packages/react/src/components/presentation/auth/SignUp/__tests__/SignUp.test.tsx, packages/vue/src/components/auth/sign-in/BaseSignIn.ts, packages/vue/src/components/auth/sign-up/BaseSignUp.ts, packages/vue/src/__tests__/components/sign-in.test.ts, packages/vue/src/__tests__/components/sign-up-popup.test.ts
React and Vue sign-in and sign-up render APIs include additionalData in their render props. Sign-up passes the current flow data, defaulting to an empty object when absent. Tests verify that sign-in and sign-up data reaches render-prop children and scoped slots.
Accept and render Next.js children
packages/nextjs/src/client/components/presentation/SignIn/SignIn.tsx, packages/nextjs/src/client/components/presentation/SignUp/SignUp.tsx
Next.js SignIn accepts children. Next.js SignUp renders its children inside BaseSignUp.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Feature

Suggested reviewers: thamindudilshan

Merge Risk: ⚪ Minimal · up to 26068

The supplied evidence shows the new data reaches Next.js render-prop consumers. No actionable merge-blocking risk remains after normal checks.

Pre-merge checks: Passed 5
Check name Status Explanation
Description check Passed The description clearly states the purpose, implementation approach, related work, testing status, parity status, and security checks. Manual testing, documentation, and integration tests are not mark…
Title check Passed The title clearly and concisely identifies the main change: exposing additionalData in SignUp and SignIn render props.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Some tools did not complete. Review the errors below.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

packages/nextjs/src/client/components/presentation/SignIn/SignIn.tsx

ESLint skipped: missing config or dependency (missing-dependency). The ESLint configuration references a package that is not available in the sandbox.

packages/react/src/components/presentation/auth/SignIn/__tests__/BaseSignIn.test.tsx

ESLint skipped: missing config or dependency (missing-dependency). The ESLint configuration references a package that is not available in the sandbox.

packages/vue/src/__tests__/components/sign-in.test.ts

ESLint skipped: missing config or dependency (missing-dependency). The ESLint configuration references a package that is not available in the sandbox.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Comment thread packages/react/src/components/presentation/auth/SignUp/BaseSignUp.tsx Outdated
Comment thread packages/react/src/components/presentation/auth/SignUp/BaseSignUp.tsx Outdated
Comment thread packages/react/src/components/presentation/auth/SignUp/BaseSignUp.tsx Outdated
Comment thread packages/vue/src/components/auth/sign-up/BaseSignUp.ts Outdated
Comment thread packages/react/src/components/presentation/auth/SignUp/__tests__/SignUp.test.tsx Outdated
@ThaminduDilshan ThaminduDilshan added the parity/prs-not-needed Nothing here reaches another SDK label Oct 14, 2026
@Sadeesha-Sath
Sadeesha-Sath force-pushed the signup-render-props-additional-data branch from 1c3a377 to 573a034 Compare October 14, 2026 13:31
@Sadeesha-Sath Sadeesha-Sath changed the title Expose additionalData in SignUp render props Expose additionalData in SignUp and SignIn render props Oct 14, 2026
Signed-off-by: Sadeesha Sathmina <sadeesha@wso2.com>
@Sadeesha-Sath
Sadeesha-Sath force-pushed the signup-render-props-additional-data branch from 573a034 to 26068d6 Compare October 16, 2026 05:19
@ThaminduDilshan
ThaminduDilshan merged commit 5b878c7 into thunder-id:main Oct 16, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

parity/prs-not-needed Nothing here reaches another SDK

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants