clerk / remix-auth-starter

Add sign up, sign in, profile management, and authenticated API routes to your Remix application with the Remix Auth Starter by Clerk.
https://clerk-remix-starter.vercel.app
MIT License
38 stars 10 forks source link

`userId` and `sessionId` always `null` (`errorReason` return `pk-fetch-error`) #5

Closed ahgood closed 1 year ago

ahgood commented 2 years ago

Root loader auth always return following value, no matter login or logout.

Root loader auth: { userId: null, sessionId: null, getToken: [AsyncFunction (anonymous)] }

Reproduce steps:

  1. Clone this repo
  2. npm install
  3. Create an app in clerk.dev and copy front api key and clerk api key(backend api key) to .env file
  4. npm run dev
  5. Open http://localhost:3000 in browser and abserve the logs in terminal, login and logout is working, but userId and sessionId always null

*I tried investigate by adding a console.log to node_modules/@clerk/remix/dist/ssr/rootAuthLoader.js, the variable errorReason return value pk-fetch-error.

{ authData, showInterstitial, errorReason } return:

{ authData: { sessionId: null, session: null, userId: null, user: null, getToken: [AsyncFunction (anonymous)], claims: null, organization: null }, showInterstitial: undefined, errorReason: 'pk-fetch-error' }

nikosdouvlis commented 1 year ago

Hello there - apologies for the delay but we don't track issues on our starter templates. Unless I'm mistaken, all the known Remix issues have been resolved. If you hit another issue please feel free to open a new issue in our main repo: https://github.com/clerkinc/javascript

Thank you!