Skip to content

Bring back auth sdk doc - #661

Merged
Fermionic-Lyu merged 7 commits into
mainfrom
auth-sdk-doc
Jan 7, 2026
Merged

Fermionic-Lyu merged 7 commits into
mainfrom
auth-sdk-doc

Conversation

@Fermionic-Lyu

@Fermionic-Lyu Fermionic-Lyu commented Dec 26, 2025 •

Copy link
Copy Markdown
Member

Summary

Update auth sdk doc and bring it back to the doc list

Summary by CodeRabbit

  • New Features

    • Added authentication SDK docs and new email verification/password reset endpoints.
  • Documentation

    • Updated auth API shapes for sign-up, sign-in, session, profile and provider data.
    • Clarified pre-built auth UI guidance for React/Next.js and custom UI usage.
  • Improvements

    • Provider data handling optimized—dashboard and visualizer now reflect the new providers structure.
    • Shared schema updated and package version bumped.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai

coderabbitai Bot commented Dec 26, 2025 •

Copy link
Copy Markdown
Contributor

Walkthrough

Refactors OAuth provider representation (oauths → oAuthProviders/providers), updates AuthService.getMetadata to fetch providers and public auth config concurrently, enables the auth-sdk docs mapping, and expands SDK docs with new sign-up/sign-in/session/profile and email/password reset endpoints and return shapes.

Changes

Cohort / File(s) Summary
Documentation Routing & Schemas
backend/src/api/routes/docs/index.routes.ts, shared-schemas/src/docs.schema.ts
Enables the auth-sdk DOCS_MAP entry and adds 'auth-sdk' to docTypeSchema.
Authentication Service
backend/src/services/auth/auth.service.ts
getMetadata() now instantiates AuthConfigService and concurrently fetches oAuthProviders and authConfigs (via Promise.all); replaces previous oauths/single-config approach and changes returned shape to include oAuthProviders.
Shared Schema Definitions
shared-schemas/src/metadata.schema.ts, shared-schemas/package.json
Replaces local authMetadataSchema with alias to getPublicAuthConfigResponseSchema; bumps shared-schemas version to 1.1.36.
SDK Documentation
docs/core-concepts/authentication/sdk.mdx, docs/insforge-instructions-sdk.md
Adds/updates auth-sdk documentation: revised return shapes for signUp, signInWithPassword, getCurrentSession, getProfile, setProfile; adds email verification & password reset endpoints; relabels pre-built auth UIs and adds auth-sdk doc type.
Frontend Visualizer Components
frontend/src/features/visualizer/components/SchemaVisualizer.tsx, frontend/src/features/visualizer/components/AuthNode.tsx, frontend/src/features/visualizer/pages/VisualizerPage.tsx
Changes SchemaVisualizer metadata prop to { auth: { providers: OAuthProvidersSchema[] }, database, storage }; AuthNode now consumes providers instead of authMetadata; VisualizerPage passes auth.providers sourced from metadata.auth.oAuthProviders.
Frontend Page & Template Components
frontend/src/features/dashboard/pages/DashboardPage.tsx, frontend/src/features/database/components/TemplatePreview.tsx
Switches provider counts/metadata fields from oauths to oAuthProviders/providers and removes functions metadata usage in TemplatePreview.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • Oauth refactor #505 — Modifies OAuth/provider data model and shared-schemas usage (oAuthProviders/providers), directly related to schema and frontend plumbing changes.
  • [WIP] [Feat] Built-in auth w/ email service #540 — Integrates auth config/provider APIs (e.g., getConfiguredProviders, getPublicAuthConfig) that AuthService now uses.
  • Feat/nextjs doc #642 — Makes similar DOCS_MAP adjustments to enable documentation type mappings (parallels enabling auth-sdk).

Suggested reviewers

  • tonychang04
  • Leo-rq-yu

Poem

🐰 I hopped through schemas, docs, and code,
Providers sorted down the new road,
Auth service fetches two at once, so spry,
Docs enabled — watch the SDK fly,
A tiny rabbit cheers: 🥕🥳

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Bring back auth sdk doc' directly reflects the main objective of re-enabling and documenting the auth-sdk feature, which is the central change across multiple files in this PR.
✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9a3d0d9 and 44a3c23.

📒 Files selected for processing (1)
  • shared-schemas/src/docs.schema.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • shared-schemas/src/docs.schema.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: CI Pre-merge Check
  • GitHub Check: E2E Tests

Comment @coderabbitai help to get the list of available commands and usage tips.


---

## getPublicAuthConfig()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

i don't think we need this.

This is purely used internally and only use in auth component. right?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yeah this is mainly used internally, but what if developer wants to use this to build an app that dynamically changes when the dashboard auth configuration changes? I would say it's a very less common use though

@tonychang04

tonychang04 commented Jan 4, 2026 •

Copy link
Copy Markdown
Member

i think we can rebase(put this in front of) main for this now?

@tonychang04 tonychang04 left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

tested 8 times looks fine to me.

can change insforge-instructions-sdk.md. try to decrease the default changce of using auth component
also worth emphasizing that need to have authorization code ui, maybe can help

@Fermionic-Lyu

Copy link
Copy Markdown
Member Author

tested 8 times looks fine to me.

can change insforge-instructions-sdk.md. try to decrease the default changce of using auth component also worth emphasizing that need to have authorization code ui, maybe can help

I updated the instructions.md. Does it look good to you? Or do we want more testing?

@Fermionic-Lyu
Fermionic-Lyu marked this pull request as ready for review January 7, 2026 00:49

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
shared-schemas/src/docs.schema.ts (1)

15-27: Update the schema description to include auth-sdk.

The .describe() text lists all documentation types but is missing the newly added "auth-sdk" type. This could lead to confusion for developers inspecting the schema.

🔎 Proposed fix to add auth-sdk to the description
   .describe(
     `
     Documentation type: 
       "instructions" (essential backend setup - use FIRST),
+      "auth-sdk" (authentication SDK for custom auth flows),
       "db-sdk" (database operations),
       "storage-sdk" (file storage),
       "functions-sdk" (edge functions),
       "auth-components-react" (authentication components for React+Vite applications),
       "auth-components-nextjs" (authentication components for Next.js applications),
       "ai-integration-sdk" (AI features),
       "real-time" (real-time pub/sub through WebSockets)
     `
   );
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b3a5da6 and 9a3d0d9.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (12)
  • backend/src/api/routes/docs/index.routes.ts
  • backend/src/services/auth/auth.service.ts
  • docs/core-concepts/authentication/sdk.mdx
  • docs/insforge-instructions-sdk.md
  • frontend/src/features/dashboard/pages/DashboardPage.tsx
  • frontend/src/features/database/components/TemplatePreview.tsx
  • frontend/src/features/visualizer/components/AuthNode.tsx
  • frontend/src/features/visualizer/components/SchemaVisualizer.tsx
  • frontend/src/features/visualizer/pages/VisualizerPage.tsx
  • shared-schemas/package.json
  • shared-schemas/src/docs.schema.ts
  • shared-schemas/src/metadata.schema.ts
🧰 Additional context used
📓 Path-based instructions (15)
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

**/*.{ts,tsx,js,jsx}: Use TypeScript for all code files
Prefer descriptive, unabbreviated variable and function names
Follow consistent file naming: kebab-case for files, PascalCase for components
Use ES modules (import/export syntax)
Implement proper error handling with try-catch blocks
Add appropriate logging for debugging
Use camelCase for variables, parameters, properties, and functions
Use UPPER_CASE for constants and Enum members
Avoid snake_case except in SQL queries and external APIs
Use single quotes for strings
Include semicolons at the end of statements
Use arrow functions for callbacks and inline functions
Prefer const over let, avoid var
Use template literals for string interpolation
Maintain consistent indentation (2 spaces)
Format code with Prettier configuration
Include JSDoc comments for complex functions

Files:

  • shared-schemas/src/docs.schema.ts
  • frontend/src/features/dashboard/pages/DashboardPage.tsx
  • frontend/src/features/database/components/TemplatePreview.tsx
  • shared-schemas/src/metadata.schema.ts
  • backend/src/api/routes/docs/index.routes.ts
  • frontend/src/features/visualizer/components/AuthNode.tsx
  • frontend/src/features/visualizer/pages/VisualizerPage.tsx
  • frontend/src/features/visualizer/components/SchemaVisualizer.tsx
  • backend/src/services/auth/auth.service.ts
{backend/src/**/*.{ts,js},shared-schemas/**/*.{ts,js}}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Use Zod schemas for request/response validation in backend

Files:

  • shared-schemas/src/docs.schema.ts
  • shared-schemas/src/metadata.schema.ts
  • backend/src/api/routes/docs/index.routes.ts
  • backend/src/services/auth/auth.service.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Use PascalCase for React components and TypeScript types/interfaces

Files:

  • shared-schemas/src/docs.schema.ts
  • frontend/src/features/dashboard/pages/DashboardPage.tsx
  • frontend/src/features/database/components/TemplatePreview.tsx
  • shared-schemas/src/metadata.schema.ts
  • backend/src/api/routes/docs/index.routes.ts
  • frontend/src/features/visualizer/components/AuthNode.tsx
  • frontend/src/features/visualizer/pages/VisualizerPage.tsx
  • frontend/src/features/visualizer/components/SchemaVisualizer.tsx
  • backend/src/services/auth/auth.service.ts
frontend/src/**/*.{tsx,jsx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

frontend/src/**/*.{tsx,jsx}: Use functional components with hooks exclusively in React
Implement proper TypeScript interfaces for all props in React components
Use React Hook Form for form handling in frontend
Follow component composition patterns in React
Implement proper loading and error states in React components
Keep components focused and single-purpose in React
Use Radix UI primitives for accessibility in frontend
Use appropriate loading skeletons for data fetching in frontend
Display clear error messages with actionable feedback in frontend
Implement proper form validation with inline errors in frontend
Use consistent icon set from lucide-react
Optimize React component re-renders

Files:

  • frontend/src/features/dashboard/pages/DashboardPage.tsx
  • frontend/src/features/database/components/TemplatePreview.tsx
  • frontend/src/features/visualizer/components/AuthNode.tsx
  • frontend/src/features/visualizer/pages/VisualizerPage.tsx
  • frontend/src/features/visualizer/components/SchemaVisualizer.tsx
frontend/src/**/*.{tsx,jsx,ts}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

frontend/src/**/*.{tsx,jsx,ts}: Use TanStack Query for server state management in frontend
Use lazy loading for code splitting
Optimize bundle size with proper imports

Files:

  • frontend/src/features/dashboard/pages/DashboardPage.tsx
  • frontend/src/features/database/components/TemplatePreview.tsx
  • frontend/src/features/visualizer/components/AuthNode.tsx
  • frontend/src/features/visualizer/pages/VisualizerPage.tsx
  • frontend/src/features/visualizer/components/SchemaVisualizer.tsx
frontend/src/**/*.{tsx,jsx,css}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Maintain consistent color scheme using CSS variables

Files:

  • frontend/src/features/dashboard/pages/DashboardPage.tsx
  • frontend/src/features/database/components/TemplatePreview.tsx
  • frontend/src/features/visualizer/components/AuthNode.tsx
  • frontend/src/features/visualizer/pages/VisualizerPage.tsx
  • frontend/src/features/visualizer/components/SchemaVisualizer.tsx
{backend,frontend}/src/**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Use environment variables for configuration

Files:

  • frontend/src/features/dashboard/pages/DashboardPage.tsx
  • frontend/src/features/database/components/TemplatePreview.tsx
  • backend/src/api/routes/docs/index.routes.ts
  • frontend/src/features/visualizer/components/AuthNode.tsx
  • frontend/src/features/visualizer/pages/VisualizerPage.tsx
  • frontend/src/features/visualizer/components/SchemaVisualizer.tsx
  • backend/src/services/auth/auth.service.ts
{backend/src/{api,controllers},frontend/src/**}/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

{backend/src/{api,controllers},frontend/src/**}/*.{ts,tsx,js,jsx}: Validate all user inputs
Use pagination for large data sets

Files:

  • frontend/src/features/dashboard/pages/DashboardPage.tsx
  • frontend/src/features/database/components/TemplatePreview.tsx
  • frontend/src/features/visualizer/components/AuthNode.tsx
  • frontend/src/features/visualizer/pages/VisualizerPage.tsx
  • frontend/src/features/visualizer/components/SchemaVisualizer.tsx
{backend/src,frontend/src}/**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

{backend/src,frontend/src}/**/*.{ts,tsx,js,jsx}: Implement proper caching strategies
Monitor and log performance metrics

Files:

  • frontend/src/features/dashboard/pages/DashboardPage.tsx
  • frontend/src/features/database/components/TemplatePreview.tsx
  • backend/src/api/routes/docs/index.routes.ts
  • frontend/src/features/visualizer/components/AuthNode.tsx
  • frontend/src/features/visualizer/pages/VisualizerPage.tsx
  • frontend/src/features/visualizer/components/SchemaVisualizer.tsx
  • backend/src/services/auth/auth.service.ts
backend/src/**/*.{ts,js}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

backend/src/**/*.{ts,js}: Use async/await for asynchronous operations in backend code
Implement proper database transaction handling
Sanitize data before database operations
Use prepared statements for SQL queries
Implement proper database indexing

Files:

  • backend/src/api/routes/docs/index.routes.ts
  • backend/src/services/auth/auth.service.ts
backend/src/api/**/*.{ts,js}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

backend/src/api/**/*.{ts,js}: Implement proper middleware for authentication and error handling
Follow RESTful conventions for API endpoints
Implement rate limiting for API endpoints

Files:

  • backend/src/api/routes/docs/index.routes.ts
backend/src/{controllers,api}/**/*.{ts,js}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Return consistent API responses using utility functions

Files:

  • backend/src/api/routes/docs/index.routes.ts
backend/src/{api,core,controllers}/**/*.{ts,js}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Implement proper authentication and authorization

Files:

  • backend/src/api/routes/docs/index.routes.ts
{backend/src/api,openapi}/**/*.{ts,yaml,yml,json}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Document all API endpoints with clear descriptions

Files:

  • backend/src/api/routes/docs/index.routes.ts
backend/src/**/*.service.ts

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Name service files in camelCase with .service.ts suffix (e.g., auth.service.ts)

Files:

  • backend/src/services/auth/auth.service.ts
🧠 Learnings (6)
📚 Learning: 2025-12-01T06:28:41.515Z
Learnt from: CR
Repo: InsForge/InsForge PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-01T06:28:41.515Z
Learning: Applies to {backend/src/**/*.{ts,js},shared-schemas/**/*.{ts,js}} : Use Zod schemas for request/response validation in backend

Applied to files:

  • shared-schemas/src/docs.schema.ts
  • shared-schemas/src/metadata.schema.ts
  • frontend/src/features/visualizer/components/SchemaVisualizer.tsx
📚 Learning: 2025-12-01T06:28:41.515Z
Learnt from: CR
Repo: InsForge/InsForge PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-01T06:28:41.515Z
Learning: Applies to {backend/src/api,openapi}/**/*.{ts,yaml,yml,json} : Document all API endpoints with clear descriptions

Applied to files:

  • backend/src/api/routes/docs/index.routes.ts
📚 Learning: 2025-12-01T06:28:41.515Z
Learnt from: CR
Repo: InsForge/InsForge PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-01T06:28:41.515Z
Learning: Applies to backend/src/{api,core,controllers}/**/*.{ts,js} : Implement proper authentication and authorization

Applied to files:

  • backend/src/api/routes/docs/index.routes.ts
  • docs/insforge-instructions-sdk.md
📚 Learning: 2025-12-01T06:28:41.515Z
Learnt from: CR
Repo: InsForge/InsForge PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-01T06:28:41.515Z
Learning: Applies to backend/src/api/**/*.{ts,js} : Implement proper middleware for authentication and error handling

Applied to files:

  • backend/src/api/routes/docs/index.routes.ts
  • docs/insforge-instructions-sdk.md
📚 Learning: 2025-12-01T06:28:41.515Z
Learnt from: CR
Repo: InsForge/InsForge PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-01T06:28:41.515Z
Learning: Applies to backend/src/{controllers,api}/**/*.{ts,js} : Return consistent API responses using utility functions

Applied to files:

  • docs/insforge-instructions-sdk.md
📚 Learning: 2025-12-12T22:31:18.410Z
Learnt from: tonychang04
Repo: InsForge/InsForge PR: 639
File: backend/src/api/routes/email/index.routes.ts:28-28
Timestamp: 2025-12-12T22:31:18.410Z
Learning: In the InsForge codebase, new API endpoints intentionally return empty objects `{}` for forward compatibility, allowing fields to be added later without breaking existing clients. The shared-schemas package defines corresponding empty object schemas (e.g., SendEmailResponse) for this purpose.

Applied to files:

  • docs/core-concepts/authentication/sdk.mdx
🧬 Code graph analysis (3)
shared-schemas/src/metadata.schema.ts (1)
shared-schemas/src/auth-api.schema.ts (1)
  • getPublicAuthConfigResponseSchema (301-309)
frontend/src/features/visualizer/pages/VisualizerPage.tsx (1)
frontend/src/features/visualizer/components/SchemaVisualizer.tsx (1)
  • SchemaVisualizer (199-394)
frontend/src/features/visualizer/components/SchemaVisualizer.tsx (2)
shared-schemas/src/auth.schema.ts (1)
  • OAuthProvidersSchema (136-136)
shared-schemas/src/metadata.schema.ts (2)
  • DatabaseMetadataSchema (62-62)
  • StorageMetadataSchema (64-64)
🪛 Gitleaks (8.30.0)
docs/core-concepts/authentication/sdk.mdx

[high] 522-522: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)


[high] 627-627: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

🔇 Additional comments (21)
shared-schemas/package.json (1)

3-3: Verify semantic versioning alignment with schema changes.

The version bump to 1.1.36 (patch) aligns with typical documentation and non-breaking releases. However, per the PR summary, the auth SDK involves refactoring OAuth provider representation from oauths to oAuthProviders/providers. Please confirm whether this schema refactoring maintains backward compatibility, or if it warrants a minor (1.2.0) or major (2.0.0) version bump instead.

backend/src/services/auth/auth.service.ts (1)

847-858: LGTM! Good use of Promise.all for concurrent data fetching.

The refactoring from a single OAuth config fetch to two separate concurrent calls improves performance by reducing sequential wait time. The use of Promise.all ensures both service methods execute in parallel, and the spread operator cleanly merges the auth config fields with the OAuth providers array in the response.

The service methods handle their own error scenarios with appropriate fallbacks (e.g., getPublicAuthConfig returns default values if no config exists), so error propagation here is intentional and correct.

frontend/src/features/database/components/TemplatePreview.tsx (1)

73-73: LGTM!

The property name change from oauths to providers is consistent with the broader refactoring in this PR and correctly reflects the updated metadata shape for SchemaVisualizer.

docs/insforge-instructions-sdk.md (2)

56-59: LGTM! Clear distinction between custom and pre-built auth flows.

The addition of the auth-sdk documentation type and the clarification that other auth options are "Pre-built auth UI" significantly improves the documentation's clarity. This helps developers choose the right implementation path based on their needs.


85-85: LGTM! Updated guidance aligns with new auth-sdk offering.

The updated important note correctly guides developers to use auth-sdk for custom UI implementations and framework-specific components for pre-built UI, which aligns perfectly with the newly enabled documentation.

shared-schemas/src/docs.schema.ts (1)

6-6: LGTM! Schema updated to include auth-sdk.

The addition of 'auth-sdk' to the enum is consistent with the documentation changes and backend route updates in this PR.

backend/src/api/routes/docs/index.routes.ts (1)

19-19: Documentation file exists and is properly mapped.

The file docs/core-concepts/authentication/sdk.mdx is present in the repository and correctly mapped in the DOCS_MAP object. No 404 errors will occur.

frontend/src/features/dashboard/pages/DashboardPage.tsx (1)

22-22: No issues found—property name refactoring is complete and consistent across the codebase.

The change from oauths to oAuthProviders has been applied consistently throughout all files including type definitions, API schemas, backend services, and frontend components. No stale references to the old property name remain.

shared-schemas/src/metadata.schema.ts (1)

5-7: LGTM! Schema consolidation improves maintainability.

Replacing the local auth metadata schema with getPublicAuthConfigResponseSchema ensures consistency across the codebase and reduces duplication. The public schema includes oAuthProviders and relevant auth config fields.

frontend/src/features/visualizer/pages/VisualizerPage.tsx (1)

91-100: LGTM! Metadata mapping aligns with the providers refactor.

The restructured metadata prop correctly maps metadata.auth.oAuthProviders to auth.providers for SchemaVisualizer, consistent with the broader schema changes across the codebase.

frontend/src/features/visualizer/components/AuthNode.tsx (2)

3-3: LGTM! Import aligns with the new providers-based schema.

Importing OAuthProvidersSchema from shared-schemas ensures type safety with the updated data structure.


8-20: LGTM! Data shape simplification improves clarity.

The component now expects providers: OAuthProvidersSchema[] directly instead of nested authMetadata.oauths, making the data flow clearer. The enabled count calculation correctly uses providers.length + 1 to account for email/password authentication.

frontend/src/features/visualizer/components/SchemaVisualizer.tsx (3)

23-42: LGTM! Prop interface updated consistently with schema changes.

The SchemaVisualizerProps now uses explicit type composition with DatabaseMetadataSchema, StorageMetadataSchema, and OAuthProvidersSchema[], replacing the previous AppMetadataSchema. This provides better type safety and aligns with the providers-based refactor.


54-58: LGTM! AuthNodeData type aligns with AuthNode component.

The providers: OAuthProvidersSchema[] type matches the updated AuthNode component expectations, ensuring type consistency across the visualizer components.


267-276: LGTM! Authentication node initialization uses correct data shape.

The auth node data correctly passes metadata.auth.providers instead of the previous nested structure, consistent with the broader refactor.

docs/core-concepts/authentication/sdk.mdx (6)

10-83: LGTM! Email verification flow clearly documented.

The updated signUp() documentation accurately reflects the new email verification workflow, including the conditional accessToken and requireEmailVerification fields. The note clearly distinguishes between code and link verification methods.


85-151: LGTM! Sign-in documentation updated with redirect support.

The signInWithPassword() documentation correctly shows the optional redirectTo and csrfToken fields, with a clear example of handling post-authentication redirects.


244-308: LGTM! Session documentation reflects updated user structure.

The getCurrentSession() documentation correctly includes the providers field in the user object and documents the automatic refresh behavior via httpOnly cookies. The example showing expiration checking is helpful.


312-420: LGTM! Flattened profile structure simplifies API usage.

The updated getProfile() and setProfile() documentation clearly shows the flattened structure with all fields at the top level, making the API more intuitive. Examples correctly demonstrate accessing fields directly from the data object.


422-532: LGTM! Email verification endpoints thoroughly documented.

The new sendVerificationEmail() and verifyEmail() documentation is comprehensive, with clear explanations of both code and link verification methods. The security note about user enumeration prevention is appropriate.


534-686: LGTM! Password reset workflows clearly documented.

The password reset documentation comprehensively covers both single-step (magic link) and two-step (code exchange) flows. The exchangeResetPasswordToken() endpoint is correctly noted as only applicable for code-based resets.

Note: Static analysis flagged example JWT tokens on lines 522 and 627, but these are documentation examples, not real secrets.

@tonychang04

Copy link
Copy Markdown
Member

it's good to go!
will let hh test the user journey and may make minor fix later if needed. Thanks!

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