feat: explicitly mention auth requirements of preference APIs#1526
Open
andy-knock wants to merge 3 commits into
Open
feat: explicitly mention auth requirements of preference APIs#1526andy-knock wants to merge 3 commits into
andy-knock wants to merge 3 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
andy-knock
commented
Jul 8, 2026
andy-knock
commented
Jul 8, 2026
andy-knock
commented
Jul 8, 2026
andy-knock
commented
Jul 8, 2026
andy-knock
commented
Jul 8, 2026
andy-knock
commented
Jul 8, 2026
andy-knock
commented
Jul 8, 2026
andy-knock
commented
Jul 8, 2026
ca503d7 to
ce23f25
Compare
5 tasks
65365c2 to
862a7f7
Compare
rachael-t
reviewed
Jul 10, 2026
rachael-t
left a comment
Contributor
There was a problem hiding this comment.
Left a few comments!
Re the typedocs (specifically deleting typedocs/client/preferences.mdx- I think Chris added those in and has some more context if there's hesitiation about fully removing it.
b8774fa to
bee9c58
Compare
Contributor
Author
|
@rachael-t fixed |
There was a problem hiding this comment.
Risk MEDIUM: Clarifies auth requirements for preference APIs across multiple documentation sections and removes deprecated typedoc pages.
Reasons
- Changes span 4+ distinct documentation sections (
in-app-ui,managing-recipients,multi-tenancy,preferences, andtypedocs), triggering the cross-section rule - 9 files modified total (7 content MDX files and 2 typedoc files), giving this PR a broad surface area
- One typedoc file is deleted (
typedocs/client/preferences.mdx) and another has a section removed, which could break existing links or references if any remain - All changes are limited to
.mdxcontent files with no component, layout, or build config modifications, keeping this out of HIGH risk - Individual file diffs are small (largest is the 54-line deletion), and no single file has both 30+ additions and 30+ deletions
Notes
- Verify that no remaining pages link to
typedocs/client/preferences.mdxor to the removedknock.preferencessection intypedocs/client/knock.mdx(the PR description mentions this was checked but it is worth confirming on the preview deploy) - Confirm the internal anchor links resolve correctly on the Vercel preview:
#authentication-with-enhanced-security,#build-your-preference-center, and the iOS/Android/Flutter push doc cross-references added insetting-channel-data.mdx - The
Related linkssection inheadless/preferences.mdxnow has a plain-text "Preferences overview" entry with no link — confirm this is intentional and not a broken link
Sent by Cursor Automation: Docs PR classifier
Co-authored-by: Rachael Thomas <54180641+rachael-t@users.noreply.github.com>
Co-authored-by: Rachael Thomas <54180641+rachael-t@users.noreply.github.com>
bee9c58 to
d591181
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
Clarifies which preference and channel-data APIs can be called from client applications with a public API key and signed user token, rather than requiring a secret key. Updates SDK quick-start and React preference docs to show the correct
authenticate()pattern and deprecateduser.getPreferences()/user.setPreferences()methods. Removes stale typedoc pages for the deprecatedpreferencesclient API.Changes
Preference center auth and client examples
in-app-ui/react/preferences.mdx— Adds signed user token to requirements; updatesauthenticate()to two-argument form; notes dev-mode behavior when enhanced security is off.in-app-ui/react/headless/preferences.mdx— Same auth requirements andKnockProviderupdates (userTokenprop, dev-mode note); removes duplicate Preferences overview link in Related links (first link remains in the intro callout).in-app-ui/javascript/sdk/quick-start.mdx— Two-argumentauthenticate()with linked enhanced security note; public-key auth note on the preferences section; switches toknockClient.user.getPreferences()/.setPreferences().Adjacent public-key clarifications
multi-tenancy/per-tenant-preferences.mdx— Notes that examples below use the server-side Node SDK; links to the preference center docs for frontend per-tenant preference management.preferences/preference-conditions.mdx— Rewrites intro to focus on how conditions fit into aPreferenceSet(no public-key auth note; that stays in broader preference center docs).managing-recipients/setting-channel-data.mdx— Adds post-code-block cross-reference to iOS, Android, and Flutter push registration docs.in-app-ui/flutter/sdk/quick-start.mdx— RenamesKNOCK_API_KEYtoKNOCK_PUBLIC_API_KEY.Typedoc cleanup
typedocs/client/knock.mdx— Removes deprecatedpreferencessection.typedocs/client/preferences.mdx— Deletes unused file (replacement methods documented underuser-client.mdx).Deferred to other PRs
preferences/overview.mdx— Auth section and client examples deferred to #1528.Context
https://knocklabs.slack.com/archives/C0AP38JP4LW/p1783547426112369?thread_ts=1783543879.292789&cid=C0AP38JP4LW
Test plan
typedocs/client/preferences.mdxis not linked from anywhere in the site