Michal Srb
Michal Srb•7mo ago

Authorization - Convex Auth

📣 If you're using Convex Auth: You'll notice that in the latest version we changed auth.getUserId to getAuthUserId. Check out the updated docs: https://labs.convex.dev/auth/authz#use-authentication-state-in-backend-functions We recommend you npm install @convex-dev/auth@latest to get this change and any recent bug fixes.
Authorization - Convex Auth
Authentication library for your Convex backend
3 Replies
rgz
rgz•7mo ago
Hey Michael, not sure if this is an issue or not. But ive ran into it twice.
Aug 20, 17:37:16

M
auth:store
failure
129ms
Uncaught Error: Invalid state
at handler (../../node_modules/@convex-dev/auth/dist/server/implementation.js:545:24)

Aug 20, 17:37:16

H
GET /api/auth/callback/google
error
'Uncaught Error: Invalid state
at handler (../../node_modules/@convex-dev/auth/dist/server/implementation.js:545:24)

at async <anonymous> (../../node_modules/@convex-dev/auth/dist/server/implementation.js:369:34)
at async invokeFunction (../../node_modules/convex/src/server/impl/registration_impl.ts:79:11)
at async invokeHttpAction (../../node_modules/convex/src/server/impl/registration_impl.ts:422:0)
at async HttpRouter.runRequest (../../node_modules/convex/src/server/router.ts:322:16)'

Aug 20, 17:37:16

H
GET /api/auth/callback/*
302
401ms
Aug 20, 17:37:16

M
auth:store
failure
129ms
Uncaught Error: Invalid state
at handler (../../node_modules/@convex-dev/auth/dist/server/implementation.js:545:24)

Aug 20, 17:37:16

H
GET /api/auth/callback/google
error
'Uncaught Error: Invalid state
at handler (../../node_modules/@convex-dev/auth/dist/server/implementation.js:545:24)

at async <anonymous> (../../node_modules/@convex-dev/auth/dist/server/implementation.js:369:34)
at async invokeFunction (../../node_modules/convex/src/server/impl/registration_impl.ts:79:11)
at async invokeHttpAction (../../node_modules/convex/src/server/impl/registration_impl.ts:422:0)
at async HttpRouter.runRequest (../../node_modules/convex/src/server/router.ts:322:16)'

Aug 20, 17:37:16

H
GET /api/auth/callback/*
302
401ms
When trying to use google oauth, the initial time it doesn't create a contact, but my credentials are stored on browser. After I click on google oauth button again, the user is then created, and flow is good. It's happened twice with the new updated version.
No description
Michal Srb
Michal SrbOP•7mo ago
@rgz probably unrelated to the release, if you have a consistent repro can you open a thread in #support-community with details / repo that reproes the issue? Thanks
rgz
rgz•7mo ago
@Michal Srb You got it man - yeah I just figured I hadn't experienced that before the update, so figured it might be. Ill create a video.

Did you find this page helpful?