Skip to content

Name the issued credential on the one-time secret screen - #4790

Merged
ThaminduDilshan merged 1 commit into
thunder-id:mainfrom
ZiyamSanthosh:embedded-apps-fix
Aug 11, 2026
Merged

Name the issued credential on the one-time secret screen#4790
ThaminduDilshan merged 1 commit into
thunder-id:mainfrom
ZiyamSanthosh:embedded-apps-fix

Conversation

@ZiyamSanthosh

@ZiyamSanthosh ZiyamSanthosh commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Purpose

Applications created with the embedded login flow option are issued a Flow Secret and no client secret. The one-time secret screen rendered the Flow Secret field correctly, but the surrounding chrome was hardcoded to client secret copy, so the screen told the user to save a "Client Secret" the application does not have.

This fixes the title, subtitle, security reminder and copy button so they name the credential (or credentials) actually shown.

Approach

ShowClientSecret now picks its copy set from which credentials are present:

  • Client secret only: existing copy, unchanged.
  • Flow Secret only: "Save Your Flow Secret", a Flow Secret security reminder, and a "Copy Flow Secret" button.
  • Both: neutral plural wording, with the footer button labelled "Copy Client Secret" so it is clear which secret it copies. The Flow Secret keeps its own copy button on its field.

New keys were added under applications:flowSecret.* and applications:secrets.* in frontend/packages/i18n/src/locales/en-US.ts. applications:clientSecret.copySecret changed from "Copy Secret" to "Copy Client Secret" for the same reason. The footer button gained a data-testid because its accessible name is now shared with the client secret field copy button.

The same component backs both the create flow and the post-create dialog on the application edit page, so both surfaces are covered.

Related Issues

Related PRs

  • N/A

Checklist

  • Followed the contribution guidelines.
  • Manual test round performed and verified.
  • Documentation provided. (Add links if there are any)
    • Ran Vale and fixed all errors and warnings
  • 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.

Security checks

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

Summary by CodeRabbit

  • New Features

    • Added support for displaying and copying client secrets, Flow Secrets, or combined secrets with context-specific labels and guidance.
    • Added security reminders and clearer save and copy instructions for each secret type.
    • Improved accessibility labels and clipboard status messaging.
  • Bug Fixes

    • Added fallback English text when translations are unavailable.
  • Tests

    • Expanded coverage for Flow Secret-only and combined-secret scenarios.

@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 3626996a-c02d-4f68-80e9-86828be0302c

📥 Commits

Reviewing files that changed from the base of the PR and between 7cd7f45 and 1de2633.

📒 Files selected for processing (2)
  • frontend/apps/console/src/features/applications/components/create-application/ShowClientSecret.tsx
  • frontend/apps/console/src/features/applications/components/create-application/__tests__/ShowClientSecret.test.tsx

📝 Walkthrough

Walkthrough

The one-time secret screen now selects titles, guidance, labels, and copy actions based on whether it displays a client secret, Flow Secret, or both. Tests cover the new secret states and copy-button selectors.

Changes

Application secret display

Layer / File(s) Summary
Secret-mode rendering
frontend/packages/i18n/src/locales/en-US.ts, frontend/apps/console/src/features/applications/components/create-application/ShowClientSecret.tsx
Added translations and dynamic fallback text for client secret, Flow Secret, and combined-secret states. Updated security guidance, accessibility labels, copy actions, and Continue button text.
Secret display validation
frontend/apps/console/src/features/applications/components/create-application/__tests__/ShowClientSecret.test.tsx
Added coverage for Flow Secret-only and combined-secret rendering and copy behavior. Updated selectors for multiple copy buttons.

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

Possibly related PRs

Suggested reviewers: donomalvindula, brionmario, senthalan

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: identifying the credential shown on the one-time secret screen.
Description check ✅ Passed The description covers the purpose, implementation, related issue, testing, security checks, and credential-specific behavior.
Linked Issues check ✅ Passed The changes satisfy issue #4742 by using correct wording and copy controls for Flow Secret-only, client-secret-only, and dual-credential cases.
Out of Scope Changes check ✅ Passed The localization, component, and test changes directly support the linked issue and stated objectives.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

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

frontend/apps/console/src/features/applications/components/create-application/ShowClientSecret.tsx

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

frontend/apps/console/src/features/applications/components/create-application/__tests__/ShowClientSecret.test.tsx

ESLint skipped: the ESLint configuration for this file 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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@frontend/apps/console/src/features/applications/components/create-application/__tests__/ShowClientSecret.test.tsx`:
- Around line 79-105: Extend the tests for the Flow Secret-only and dual-secret
cases in the ShowClientSecret test suite to assert the exact saveSubtitle text
for each mode. Add these assertions alongside the existing heading and
security-text checks, using the rendered subtitle element or established
selector, while preserving the current copy-label and secret-value assertions.

In
`@frontend/apps/console/src/features/applications/components/create-application/ShowClientSecret.tsx`:
- Around line 72-98: Update resolveCopy to accept and pass fallback strings for
the client-secret, flow-secret, and both-secret translation modes, and provide
appropriate fallbacks at each saveTitle, saveSubtitle, and
securityReminderDescription call. Add fallback strings to both branches of
copySecretLabel and to the applications:clientSecret.copied translation,
preserving the existing mode-specific text selection.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: b2441ae6-b15c-4841-81cc-8baec2418f8b

📥 Commits

Reviewing files that changed from the base of the PR and between ba37ccd and 82504bb.

📒 Files selected for processing (3)
  • frontend/apps/console/src/features/applications/components/create-application/ShowClientSecret.tsx
  • frontend/apps/console/src/features/applications/components/create-application/__tests__/ShowClientSecret.test.tsx
  • frontend/packages/i18n/src/locales/en-US.ts

@ZiyamSanthosh ZiyamSanthosh added the trigger-pr-builder Add when the PR is ready for CI; starts the PR Builder for this and all later pushes label Aug 10, 2026
@codecov

codecov Bot commented Aug 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

The one-time secret screen was hardcoded to client secret copy, so
applications issued only a Flow Secret were told to save a client
secret they do not have. Pick the title, subtitle, security reminder
and copy button label based on which credentials are shown.

Fixes thunder-id#4742
@ThaminduDilshan
ThaminduDilshan added this pull request to the merge queue Aug 11, 2026
Merged via the queue into thunder-id:main with commit d598a6d Aug 11, 2026
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

trigger-pr-builder Add when the PR is ready for CI; starts the PR Builder for this and all later pushes Type/Bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Console shows client secret copy on the one-time secret screen for embedded login flow apps

3 participants