Skip to content

feat: additional documentation - #209

Open
mrudatsprint wants to merge 12 commits into
miker/eng-4790from
miker/eng-4791/documentation
Open

feat: additional documentation#209
mrudatsprint wants to merge 12 commits into
miker/eng-4790from
miker/eng-4791/documentation

Conversation

@mrudatsprint

@mrudatsprint mrudatsprint commented Aug 2, 2026

Copy link
Copy Markdown
Collaborator

Issues:

Description:

Generate the documentation for each SDK.

…ion.

typedoc@0.25.13 only supports TypeScript up to 5.4, but sdk-angular runs
TypeScript ~6.0.0 (bumped in the Angular 22 upgrade). Bump typedoc to
^0.28.20 (explicit TS 6.0.x support) and typedoc-plugin-markdown to
^4.12.0 (required peer range for typedoc 0.28.x).

Also fix tsconfig.json's base types declaration: it still listed
["jasmine"] even though the Angular test runner was migrated to Vitest
in the 2.0.0 release, causing typedoc's full-program type check to fail
on *.spec.ts files referencing vitest globals (expect, it). Changed to
["vitest/globals", "node"], matching tsconfig.spec.json. This only
affects tooling that reads the base tsconfig directly (typedoc, IDEs);
the actual build/test tsconfigs (tsconfig.lib*.json, tsconfig.spec.json)
already declare their own types and are unaffected.
…doc output.

ENG-4791: Add a Resource Server Guidance subsection under DPoP Mode in
each SDK's README (React, Vue, Angular), covering guidance for backend
developers validating FusionAuth-issued DPoP tokens:

- The SDK does not implement jti replay prevention; that's the resource
  server's responsibility (in-memory Map+TTL for single instance,
  Redis or similar for horizontally scaled deployments).
- htu validation and reverse-proxy trust-proxy considerations.
- The Authorization header uses the DPoP scheme, not Bearer.

Also regenerate the typedoc output (yarn docs) for all three SDKs, which
was stale and had no mention of the DPoP API surface (dpopFetch,
generateProof, getAccessToken, useDpop, dpopTokenStorage, etc.).
@mrudatsprint
mrudatsprint changed the base branch from main to miker/eng-4790 August 2, 2026 18:28
- Add useCodeBlocks: true to sdk-angular's typedocOptions. Without it,
  typedoc-plugin-markdown@4's default blockquote-style signatures (e.g.
  `> **forRoot**(...): `ModuleWithProviders`\<`FusionAuthModule`\>`)
  trigger a prettier@3.9.6 markdown-formatter bug that inserts a stray
  '>' when reformatting an escaped '\>' immediately after inline code
  within a blockquote line. Fenced code blocks avoid the pattern
  entirely and are more readable besides.
- Regenerate sdk-react and sdk-vue docs (picks up the latest commit
  hash in "Defined in" links) and run prettier --write across all
  three SDKs' generated docs. Verified every non-'***'->'---'-normalization
  diff (table column alignment, redundant double-backtick removal) is
  safe by diffing against the pre-write output; no content was altered
  or corrupted.

Copilot AI 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.

Pull request overview

This PR updates the DPoP documentation across the Vue, React, and Angular SDKs, including adding resource server guidance and refreshing generated TypeDoc outputs (with an Angular TypeDoc/tooling bump) to support ENG-4791.

Changes:

  • Added “Resource Server Guidance” under DPoP documentation for Vue/React/Angular.
  • Expanded Vue/React docs with a DPoP Mode section and updated TOCs/formatting.
  • Updated Angular docs generation config (TypeDoc/plugin upgrade) and regenerated docs; updated yarn.lock accordingly.

Reviewed changes

Copilot reviewed 31 out of 32 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
yarn.lock Locks new/updated dependencies from the doc tooling updates.
packages/sdk-vue/README.md Adds resource-server guidance under DPoP documentation.
packages/sdk-vue/docs/README.md Adds DPoP Mode section + resource server guidance; general doc formatting updates.
packages/sdk-vue/docs/modules.md Regenerated module index links/paths.
packages/sdk-vue/docs/interfaces/UserInfo.md Regenerated interface docs formatting/link targets.
packages/sdk-vue/docs/interfaces/FusionAuthConfig.md Documents new/updated DPoP-related config fields (generated output).
packages/sdk-vue/docs/interfaces/FusionAuth.md Documents DPoP-related API surface (dpopFetch, generateProof, getAccessToken) (generated output).
packages/sdk-react/README.md Adds resource-server guidance under DPoP documentation.
packages/sdk-react/docs/README.md Adds DPoP Mode + resource server guidance; doc formatting updates.
packages/sdk-react/docs/modules/ui_Unauthenticated.md Regenerated TypeDoc link target updates.
packages/sdk-react/docs/modules/ui_RequireAuth.md Regenerated TypeDoc link target updates.
packages/sdk-react/docs/modules/ui_FusionAuthRegisterButton.md Regenerated TypeDoc link target updates.
packages/sdk-react/docs/modules/ui_FusionAuthLogoutButton.md Regenerated TypeDoc link target updates.
packages/sdk-react/docs/modules/ui_FusionAuthLoginButton.md Regenerated TypeDoc link target updates.
packages/sdk-react/docs/modules/providers_FusionAuthProvider.md Regenerated TypeDoc link target updates.
packages/sdk-react/docs/interfaces/providers_FusionAuthProviderContext.FusionAuthProviderContext.md Adds DPoP-related context fields in generated docs.
packages/sdk-react/docs/interfaces/providers_FusionAuthProviderConfig.FusionAuthProviderConfig.md Adds DPoP-related config fields in generated docs.
packages/sdk-angular/tsconfig.json Updates TypeDoc options and compiler types for vitest/node.
packages/sdk-angular/README.md Adds resource-server guidance under DPoP documentation.
packages/sdk-angular/package.json Upgrades TypeDoc + typedoc-plugin-markdown versions.
packages/sdk-angular/docs/README.md Regenerated docs README header/formatting.
packages/sdk-angular/docs/interfaces/UserInfo.md Regenerated interface docs formatting/links.
packages/sdk-angular/docs/interfaces/FusionAuthConfig.md Regenerated config interface docs; includes DPoP-related fields.
packages/sdk-angular/docs/globals.md Regenerated globals index formatting.
packages/sdk-angular/docs/classes/FusionAuthService.md Regenerated class docs; includes DPoP method docs.
packages/sdk-angular/docs/classes/FusionAuthRegisterButtonComponent.md Regenerated class docs formatting/links.
packages/sdk-angular/docs/classes/FusionAuthModule.md Regenerated class docs formatting/links.
packages/sdk-angular/docs/classes/FusionAuthLogoutButtonComponent.md Regenerated class docs formatting/links.
packages/sdk-angular/docs/classes/FusionAuthLoginButtonComponent.md Regenerated class docs formatting/links.
packages/sdk-angular/docs/classes/FusionAuthAccountButtonComponent.md Regenerated class docs formatting/links.
packages/sdk-angular/docs/.nojekyll Removes the .nojekyll file from Angular docs output.

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

Comment thread packages/sdk-vue/docs/README.md
Comment thread packages/sdk-react/docs/README.md
Comment thread packages/sdk-vue/docs/interfaces/FusionAuth.md
mrudatsprint added a commit that referenced this pull request Aug 2, 2026
- packages/sdk-vue/README.md: fix reversed welcomeMessage ternary in the
  usage example (was returning the generic greeting when a name IS
  present, and interpolating the possibly-undefined name otherwise).
- packages/sdk-react/README.md: correct invalid Formatting section
  commands (npm run install / npm run prettier -- -w) to the actual
  yarn-based equivalents (yarn install / yarn prettier --write).
- getAccessToken() JSDoc: remove the inaccurate "Throws a descriptive
  error when useDpop: false" line from the optional getAccessToken
  field in sdk-react's FusionAuthProviderContext, sdk-vue's
  FusionAuth type, and core's SDKContext interface. These fields are
  simply undefined when useDpop is false (verified against
  useDpop.ts / createFusionAuth.ts); they don't throw. Matches the
  accurate style already used by the sibling dpopFetch/generateProof
  JSDoc. Angular's FusionAuthService.getAccessToken() is unaffected
  since it's non-optional there and does genuinely delegate straight
  to SDKCore, which does throw.
- Regenerate sdk-react and sdk-vue docs and re-run prettier to pick up
  all of the above.
@mrudatsprint
mrudatsprint force-pushed the miker/eng-4791/documentation branch from 50afc59 to 3cedf88 Compare August 2, 2026 20:19
@mrudatsprint
mrudatsprint requested a review from Copilot August 2, 2026 20:24

Copilot AI 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.

Pull request overview

Copilot reviewed 31 out of 32 changed files in this pull request and generated no new comments.

Suppressed comments (5)

packages/sdk-vue/docs/README.md:170

  • The welcomeMessage example has the conditional reversed: when name is present it returns a generic "Welcome!", and when it’s absent it interpolates userInfo.value.given_name (which may be undefined / throw if userInfo.value is null). This makes the snippet misleading and potentially unsafe.
  const welcomeMessage = computed(() => {
    const name = userInfo.value?.given_name;
    return name ? 'Welcome!' : `Welcome ${userInfo.value.given_name}!`;
  });

packages/sdk-react/docs/README.md:304

  • These commands aren’t valid for this repo: npm run install won’t install dependencies (it runs an install script), and there is no prettier npm script (root scripts use format:fix / format:check). Use Yarn (or the repo’s format script) instead.
- npm run install
- npm run prettier -- -w /path/to/file

AGENTS.md:47

  • This guidance references an npm run prettier script that doesn’t exist in the root package.json (scripts are format:fix / format:check). This can mislead contributors and cause formatting to be skipped or fail in CI.
  width). Run `npm run prettier -- -w /path/to/file <paths>` / `--write` before committing.

packages/sdk-react/docs/interfaces/providers_FusionAuthProviderContext.FusionAuthProviderContext.md:133

  • This getAccessToken doc says it "throws" when useDpop: false, but in the React SDK the property is optional and is undefined unless useDpop: true (see FusionAuthProvider.test.tsx expectations). The docs should reflect the actual runtime shape to avoid confusing consumers; also consider fixing the source JSDoc in FusionAuthProviderContext.ts so re-generated docs stay correct.
Returns the stored DPoP access token, or `null` if not logged in.
Throws a descriptive error when `useDpop: false`.
Present only when `useDpop: true`.

packages/sdk-vue/docs/interfaces/FusionAuth.md:110

  • This getAccessToken doc says it "throws" when useDpop: false, but in the Vue SDK the property is optional and is undefined unless useDpop: true (see createFusionAuth.ts assigning undefined when useDpop is falsy, and the corresponding tests). The docs should reflect the actual runtime shape; also consider fixing the source JSDoc in packages/sdk-vue/src/types.ts so re-generated docs stay correct.
Returns the stored DPoP access token, or `null` if not logged in.
Throws a descriptive error when `useDpop: false`.
Present only when `useDpop: true`.

@@ -1,61 +1,43 @@
[@fusionauth/angular-sdk](../README.md) / [Exports](../modules.md) / FusionAuthAccountButtonComponent

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This PR includes the updated generated SDK documentation for each Framework.

- [State Parameter](#state-parameter)
- [SSR](#ssr)
- [DPoP Mode](#dpop-mode)
- [Resource Server Guidance](#resource-server-guidance)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Each SDK has a README and a Resource Server Guidance section was added.

@mrudatsprint mrudatsprint left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

self-review completed

@mrudatsprint
mrudatsprint marked this pull request as ready for review August 3, 2026 16:06
…ion.

typedoc@0.25.13 only supports TypeScript up to 5.4, but sdk-angular runs
TypeScript ~6.0.0 (bumped in the Angular 22 upgrade). Bump typedoc to
^0.28.20 (explicit TS 6.0.x support) and typedoc-plugin-markdown to
^4.12.0 (required peer range for typedoc 0.28.x).

Also fix tsconfig.json's base types declaration: it still listed
["jasmine"] even though the Angular test runner was migrated to Vitest
in the 2.0.0 release, causing typedoc's full-program type check to fail
on *.spec.ts files referencing vitest globals (expect, it). Changed to
["vitest/globals", "node"], matching tsconfig.spec.json. This only
affects tooling that reads the base tsconfig directly (typedoc, IDEs);
the actual build/test tsconfigs (tsconfig.lib*.json, tsconfig.spec.json)
already declare their own types and are unaffected.
…doc output.

ENG-4791: Add a Resource Server Guidance subsection under DPoP Mode in
each SDK's README (React, Vue, Angular), covering guidance for backend
developers validating FusionAuth-issued DPoP tokens:

- The SDK does not implement jti replay prevention; that's the resource
  server's responsibility (in-memory Map+TTL for single instance,
  Redis or similar for horizontally scaled deployments).
- htu validation and reverse-proxy trust-proxy considerations.
- The Authorization header uses the DPoP scheme, not Bearer.

Also regenerate the typedoc output (yarn docs) for all three SDKs, which
was stale and had no mention of the DPoP API surface (dpopFetch,
generateProof, getAccessToken, useDpop, dpopTokenStorage, etc.).
- Add useCodeBlocks: true to sdk-angular's typedocOptions. Without it,
  typedoc-plugin-markdown@4's default blockquote-style signatures (e.g.
  `> **forRoot**(...): `ModuleWithProviders`\<`FusionAuthModule`\>`)
  trigger a prettier@3.9.6 markdown-formatter bug that inserts a stray
  '>' when reformatting an escaped '\>' immediately after inline code
  within a blockquote line. Fenced code blocks avoid the pattern
  entirely and are more readable besides.
- Regenerate sdk-react and sdk-vue docs (picks up the latest commit
  hash in "Defined in" links) and run prettier --write across all
  three SDKs' generated docs. Verified every non-'***'->'---'-normalization
  diff (table column alignment, redundant double-backtick removal) is
  safe by diffing against the pre-write output; no content was altered
  or corrupted.
@mrudatsprint
mrudatsprint force-pushed the miker/eng-4791/documentation branch from 3cedf88 to 1d53741 Compare August 3, 2026 16:08
@mrudatsprint
mrudatsprint requested a review from wied03 August 3, 2026 16:11
@mrudatsprint mrudatsprint changed the title feat: DPoP documentation feat: additional documentation Aug 3, 2026
@mrudatsprint
mrudatsprint requested review from lyleschemmerling and removed request for wied03 August 3, 2026 23:05
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