Skip to content

Add WorkOS AuthKit Integration Documentation #150

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

nicknisi
Copy link

This pull request adds comprehensive documentation for integrating WorkOS AuthKit with Convex applications.

Changes

  • Documentation: Added complete AuthKit integration guide (npm-packages/docs/docs/auth/authkit.mdx)

    • Step-by-step WorkOS account setup
    • AuthKit configuration instructions
    • JWT verification setup
    • Code examples for React integration
  • Screenshots: Added 6 UI screenshots showing WorkOS dashboard configuration steps

    • Account signup flow
    • AuthKit setup process
    • Client ID retrieval
    • JWT configuration
    • Redirect URI setup
    • Navigation walkthrough
  • Code Examples: Added implementation examples

    • TypeScript React integration (_mainAuthKit.tsx)
    • JavaScript React integration (_mainAuthKit.jsx)
    • Convex functions with auth (workosFunctions.ts)

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

### React

**Example:**
[React with Convex and AuthKit](https://github.com/workos/template-convex-react-vite-authkit)
Copy link
Author

Choose a reason for hiding this comment

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

note: this template repo could be move to the convex org if that's easier.

### Next.js

**Example:**
[Next.js with Convex and AuthKit](https://github.com/workos/template-convex-nextjs-authkit)
Copy link
Author

Choose a reason for hiding this comment

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

note: this template repo could be move to the convex org if that's easier.

@nicknisi nicknisi force-pushed the nicknisi/authkit-docs branch from 13dc41b to 863788e Compare July 16, 2025 21:09
import { createRoot } from "react-dom/client";
import { AuthKitProvider, useAuth } from "@workos-inc/authkit-react";
import { ConvexReactClient } from "convex/react";
import { ConvexProviderWithAuthKit } from "convex/react-authkit";
Copy link
Author

Choose a reason for hiding this comment

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

note: I followed the patterns I saw in other guides and added this provider in get-convex/convex-js#55.

import { createRoot } from "react-dom/client";
import { AuthKitProvider, useAuth } from "@workos-inc/authkit-react";
import { ConvexReactClient } from "convex/react";
import { ConvexProviderWithAuthKit } from "convex/react-authkit";
Copy link
Author

Choose a reason for hiding this comment

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

note: I followed the patterns I saw in other guides and added this provider in get-convex/convex-js#55.

@nicknisi nicknisi force-pushed the nicknisi/authkit-docs branch from 863788e to 393d08e Compare July 16, 2025 21:36
@nicknisi nicknisi marked this pull request as ready for review July 16, 2025 21:42
@nicknisi nicknisi force-pushed the nicknisi/authkit-docs branch from 393d08e to b7179d4 Compare July 16, 2025 21:43
@nipunn1313
Copy link
Collaborator

Assigning to @ikhare to take a look

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.

3 participants