things that are missing from their docs:

  • how can the backend authenticate any given user on interactions?
  • what does the callback actually do? not clear how or why this works
    • for instance something like this:
When a GET request hits your /auth/callback endpoint, this handler:

- Processes the authentication callback from WorkOS

- Handles the OAuth/SSO flow completion

- Sets up any necessary session cookies

- Returns a Response object that typically redirects the user to your specified returnPathname ('/' in your case)
./node_modules/@workos-inc/authkit-nextjs/dist/esm/impersonation.js
Error:   x It is not allowed to define inline "use server" annotated Server Actions in Client Components.
  | To use Server Actions in a Client Component, you can either export them from a separate file with "use server" at the top, or pass them down through props from a Server Component.
  | 
  | Read more: https://nextjs.org/docs/app/api-reference/functions/server-actions#with-client-components
  | 
    ,-[/Users/malin/code/fractalbootcamp/deployments/felt-sense/node_modules/@workos-inc/authkit-nextjs/dist/esm/impersonation.js:50:1]
 47 |                 lineHeight: '1.4',
 48 |             } },
 49 |             React.createElement("form", { action: async () => {
 50 |                     'use server';
    :                     ^^^^^^^^^^^^
 51 |                     await signOut();
 52 |                 }, style: {
 53 |                     display: 'flex',
    `----

Import trace for requested module:
./node_modules/@workos-inc/authkit-nextjs/dist/esm/impersonation.js
./node_modules/@workos-inc/authkit-nextjs/dist/esm/index.js
./src/app/components/SpeakArea.tsx


> Build failed because of webpack errors
error: script "build" exited with code 1