Skip to content

docs: Habr link + "Verifying on your backend" section + hardened minting snippet - #16

Merged
KAMRONBEK merged 3 commits into
mainfrom
docs/habr-and-backend-verify
Jul 25, 2026
Merged

KAMRONBEK merged 3 commits into
mainfrom
docs/habr-and-backend-verify

Conversation

@KAMRONBEK

Copy link
Copy Markdown
Contributor

Docs-only changes (no code, no version bump). Three atomic commits; all three language READMEs (EN/RU/UZ) kept at exact line parity (476 lines each). CI native jobs are skipped via the docs-only path.

What & why

1. Link the Habr RU tutorial (ee339ab)

Adds the newly-published Russian tutorial (habr.com/ru/articles/1062676) to Guides & articles. The RU README now leads with Habr (native-language); EN/UZ append it after the Medium guide. Previously the RU README pointed Russian readers at the English Medium post — this fixes that mismatch.

2. New "Verifying on your backend" section (da39781)

A dedicated section on the single most common integration mistake — trusting the client result.code. Covers:

  • Redeeming the one-time code with a real if (!res.ok) throw check
  • Judging comparison_value against your own threshold (framed as a risk decision — no invented magic number)
  • Binding the returned identity (a live match to the wrong person is still wrong)
  • The Secondary Request Flow via reuid
  • Crash/recovery pointer back to the minting section

Every field and endpoint used (comparison_value, data.profile, reuid, both GET routes) is already established elsewhere in the README — nothing new invented.

3. Harden the minting snippet (8f6813e)

Routes all three backend fetches (access-token, session, data) through a small json() helper that throws on non-2xx, so a failed mint or redeem can never be silently parsed as a valid session/result. Replaces the bare .then(r => r.json()) calls.

Notes

  • README changes render on npmjs.com only after the next publish (npm freezes the README at publish time).
  • Suggested to ship as part of a v0.1.6 docs release.

Add the Russian-language Habr tutorial to the Guides & articles section.
RU README leads with Habr (native-language), EN/UZ append it after Medium.
Dedicated server-side verification guide covering the #1 integration
mistake (trusting the client result): redeem the code with an r.ok
check, judge comparison_value against your own threshold, bind the
returned identity, the Secondary Request Flow (reuid), and crash
recovery. Closes the open backend-verify docs item. Keeps the three
language READMEs at line parity (470 lines each).
Route all three backend fetches (access-token, session, data) through a
json() helper that throws on non-2xx, so a failed mint or redeem can
never be silently parsed as a valid session or result. Closes the last
open backend-verify item. 3-language line parity preserved (476 each).
@KAMRONBEK
KAMRONBEK merged commit 725cc52 into main Jul 25, 2026
5 checks passed
@KAMRONBEK KAMRONBEK mentioned this pull request Jul 25, 2026
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