Skip to content

chore(admin): deeplink to RP when creating WAF bypass token#20630

Open
toufali wants to merge 1 commit into
mainfrom
admin-rp-deeplink-waf-bypass
Open

chore(admin): deeplink to RP when creating WAF bypass token#20630
toufali wants to merge 1 commit into
mainfrom
admin-rp-deeplink-waf-bypass

Conversation

@toufali
Copy link
Copy Markdown
Member

@toufali toufali commented May 20, 2026

Because

  • Admins clicking "manage in WAF Bypass Tokens" from a relying party with no token lost all RP context and had to manually find and reselect the RP in the create form.

This pull request

  • Updates the RP panel link to carry createForClientId and name query params so the WAF bypass form is prefilled with RP context.

Issue that this pull request solves

Closes: FXA-13769

Checklist

Put an x in the boxes that apply

  • My commit is GPG signed.
  • If applicable, I have modified or added tests which pass locally.
  • I have added necessary documentation (if appropriate).
  • I have verified that my changes render correctly in RTL (if appropriate).
  • I have manually reviewed all AI generated code.

@toufali toufali requested a review from a team as a code owner May 20, 2026 21:04
Copilot AI review requested due to automatic review settings May 20, 2026 21:04
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR improves the FxA Admin Panel workflow for creating WAF bypass tokens by preserving relying party (RP) context when navigating from an RP detail view to the WAF Tokens page, using query params to prefill the create-token form.

Changes:

  • Add support in the WAF Tokens page to consume createForClientId and name query params, auto-open the create form, and then clear those params from the URL.
  • Add unit tests covering auto-open/prefill behavior and query param clearing.
  • Update the Relying Parties page to deeplink to the WAF Tokens page with the appropriate prefill query params.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
packages/fxa-admin-panel/src/components/PageWafTokens/index.tsx Consume query params to prefill/auto-open the create token form and clear params from the URL.
packages/fxa-admin-panel/src/components/PageWafTokens/index.test.tsx Add tests validating prefill/auto-open behavior and query param cleanup.
packages/fxa-admin-panel/src/components/PageRelyingParties/index.tsx Update RP panel link to deeplink into token creation with RP context.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/fxa-admin-panel/src/components/PageWafTokens/index.tsx
@toufali toufali force-pushed the admin-rp-deeplink-waf-bypass branch from 8a2a3e6 to 96dab23 Compare May 20, 2026 21:30
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