Skip to content

Add Spark Auth Tool (interactive cipher/signature simulator)#124

Open
anayse-sardinha wants to merge 6 commits into
mainfrom
spark-html-tool
Open

Add Spark Auth Tool (interactive cipher/signature simulator)#124
anayse-sardinha wants to merge 6 commits into
mainfrom
spark-html-tool

Conversation

@anayse-sardinha

Copy link
Copy Markdown
Collaborator

Summary

Adds the client-provided Spark Auth Tool to the DevZone: a browser-based interactive simulator that lets integrators encrypt/decrypt the auth ciphers and build the required HTTP header signatures without writing code. Goal is to cut friction and support overhead around Spark auth integration.

The tool is fully client-side (Web Crypto API, no backend); the only external dependency is Google Fonts.

What's included

  • Hosted tool at tools/spark-auth-tool.html, served at /tools/spark-auth-tool.html. Two small local tweaks were added on top of the client's file:
    • Embedded mode — when loaded inside a docs iframe it hides its own DevZone header so there's no doubled chrome. Standalone view is unchanged.
    • ?auth=legacy deep-link — opens the tool directly on the Legacy Auth (v1) flow.
  • Inline embed in the Authentication and Legacy Authentication pages (under Security & Authentication), each with a short tab pointer and a "full screen" link.
  • Home page tile — an "Auth Tool | Spark" card added to the Terminal SDKs grid (snippets/IntegratePOS.jsx), linking to the Authentication page.

docs.json is unchanged (the tool is surfaced via the embeds and the home tile, not a new nav entry).

Verification

Verified locally with mint dev: home, both auth pages, and the tool asset (incl. ?auth=legacy) all return 200; embeds render; no build errors from these changes.

Before publishing

  • The tool's HTML is "not the final version yet" per the client. When the final drop overwrites the file, the two local tweaks (embedded mode + ?auth=legacy deep-link) must be re-applied.
  • Confirm the tool's hardcoded "Load example data" credentials are dummy/sandbox values, not live, before this goes public.

🤖 Generated with Claude Code

anayse-sardinha and others added 2 commits June 22, 2026 15:37
Embed the client-provided browser-based Spark auth simulator in the docs.
The tool runs entirely client-side (Web Crypto API), encrypting/decrypting
the StartAuthentication and StartSession ciphers and building the
TransactionSignature / legacy Signature headers.

- Host the self-contained tool at /tools/spark-auth-tool.html, with an
  embedded mode (hides its own header inside an iframe) and a ?auth=legacy
  deep-link that opens the Legacy Auth (v1) flow.
- Embed it inline in the Authentication and Legacy Authentication pages.
- Add an "Auth Tool" tile to the Terminal SDKs grid on the home page.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Mintlify production does not serve raw .html files, so the iframe embed
404'd in the deploy preview. Replace the iframe with a native React
component that renders the tool's exact markup, CSS, and script inside a
shadow root (style isolation), driven by the tool's own logic.

- snippets/SparkAuthTool.jsx: generated component (verbatim port).
- tools/generate-spark-auth-tool.mjs: regenerates the component from
  tools/spark-auth-tool.html; re-run when the client ships a new version.
- Authentication / Legacy Authentication pages now import and render
  <SparkAuthTool /> (legacy variant opens on the Legacy Auth v1 tab).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Mintlify's production bundler evaluates the exported component in isolation
and drops non-exported module-level declarations, so the module-level
CSS/BODY/SCRIPT consts were undefined at runtime (ReferenceError: BODY is
not defined), and the component crashed and unmounted. Move the constants
inside the component function so they travel with it.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@mintlify

mintlify Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
Nayax 🟢 Ready View Preview Jun 22, 2026, 7:44 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

Per client request, surface the tool from the StartAuthentication and
StartSession reference pages.

- openapi/spark.yaml: add a "Try it: Spark Auth Tool" card to both operation
  descriptions. StartSession links with #startsession.
- SparkAuthTool component: read a URL hash on mount so a link can open a
  specific tab (#startsession opens the StartSession tab).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
StartSession had the same text in both x-mint.content and the standard
description field, so the reference page rendered it twice. Drop the
redundant description; x-mint.content (text + Try it card) remains.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

1 participant