Skip to content

docs: fix inconsistencies in V8 migration guide#1449

Merged
nicknisi merged 1 commit intomainfrom
nicknisi/v8-migration-guide-fixes
Jan 12, 2026
Merged

docs: fix inconsistencies in V8 migration guide#1449
nicknisi merged 1 commit intomainfrom
nicknisi/v8-migration-guide-fixes

Conversation

@nicknisi
Copy link
Member

@nicknisi nicknisi commented Jan 12, 2026

Summary

  • Fix method name corrections (sendMagicCodecreateMagicAuth, sendPasswordResetEmailcreatePasswordReset)
  • Fix refreshAndSealSessionData migration example to use loadSealedSession pattern
  • Fix verifyFactor example to use authenticationChallengeId instead of authenticationFactorId
  • Add blank lines before code blocks for consistent markdown formatting

@nicknisi nicknisi requested a review from a team as a code owner January 12, 2026 21:12
@nicknisi nicknisi merged commit 0c5405e into main Jan 12, 2026
8 checks passed
@nicknisi nicknisi deleted the nicknisi/v8-migration-guide-fixes branch January 12, 2026 21:14
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Jan 12, 2026

Greptile Overview

Greptile Summary

This PR fixes several critical documentation errors in the V8 Migration Guide that would have caused runtime errors if developers followed the incorrect examples:

Corrected Method Names

  • Magic Auth: Fixed sendMagicCode()createMagicAuth() (verified in src/user-management/user-management.ts:713)
  • Password Reset: Fixed sendPasswordResetEmail()createPasswordReset() (verified in src/user-management/user-management.ts:749)

Fixed Session Refresh Pattern

The previous example referenced non-existent refreshSession and sealSession functions. The corrected example properly demonstrates:

  1. Using loadSealedSession() to get a CookieSession instance (verified in src/user-management/user-management.ts:212)
  2. Calling refresh() on that instance (verified in src/user-management/session.ts:114)
  3. Accessing result.sealedSession from the response (verified in src/user-management/interfaces/refresh-and-seal-session-data.interface.ts:27)

Fixed MFA Parameter Name

Changed authenticationFactorIdauthenticationChallengeId in the verifyChallenge() example, matching the actual interface definition in src/mfa/interfaces/verify-challenge-options.ts:2.

Markdown Formatting

Added blank lines before code blocks throughout the document for consistent rendering.

All changes have been verified against the actual codebase and are accurate.

Confidence Score: 5/5

  • This PR is completely safe to merge - it only fixes documentation errors with no code changes.
  • Score of 5 reflects that this is a documentation-only PR that corrects critical errors in the migration guide. All corrections have been thoroughly verified against the actual codebase implementation. The changes prevent developers from following incorrect examples that would cause runtime errors. There are no code changes, no breaking changes, and no security implications.
  • No files require special attention - this is a straightforward documentation correction.

Important Files Changed

File Analysis

Filename Score Overview
docs/V8_MIGRATION_GUIDE.md 5/5 Documentation fixes: corrects method names (createMagicAuth, createPasswordReset), updates session refresh pattern to use loadSealedSession, fixes verifyFactor parameter from authenticationFactorId to authenticationChallengeId, and adds consistent markdown formatting with blank lines before code blocks

Sequence Diagram

sequenceDiagram
    participant Dev as Developer
    participant WOS as WorkOS SDK
    participant CS as CookieSession
    participant API as WorkOS API

    Note over Dev,API: Session Refresh Flow (v8)

    Dev->>WOS: loadSealedSession({sessionData, cookiePassword})
    WOS->>CS: new CookieSession(userManagement, sessionData, cookiePassword)
    CS-->>Dev: CookieSession instance

    Dev->>CS: refresh({organizationId})
    CS->>CS: unsealData(sessionData)
    CS->>API: authenticateWithRefreshToken({refreshToken, organizationId})
    API-->>CS: AuthenticationResponse + sealedSession
    CS->>CS: Update internal sessionData
    CS-->>Dev: {authenticated: true, sealedSession, session, ...}

    Note over Dev: result.sealedSession contains<br/>the new sealed session data
Loading

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

No files reviewed, no comments

Edit Code Review Agent Settings | Greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants