unsphereU
Convex Community10mo ago
14 replies
unsphere

Convex Auth Twitter Error

Hey, I set up twitter with convex auth as additional auth for linking the account atm. For primary auth I am using custom ConvexCredentials providers for eth/sol/ton wallet signin which works fine. However after signin with twitter I get the authorize screen but after authorizing it redirects back to previous path because I get the following error in the log at GET /api/auth/callback/twitter

'server responded with an error in the response body
    at checkOAuthBodyError (../../node_modules/oauth4webapi/src/index.ts:2656:8)
    at async processGenericAccessTokenResponse (../../node_modules/oauth4webapi/src/index.ts:3328:2)
    at async processAuthorizationCodeOAuth2Response (../../node_modules/oauth4webapi/src/index.ts:3868:17)
    at async handleOAuth (../../node_modules/@convex-dev/auth/src/server/oauth/callback.ts:163:21)
    at async <anonymous> (../../node_modules/@convex-dev/auth/src/server/implementation/index.ts:326:34)
    at async invokeFunction (../../node_modules/convex/src/server/impl/registration_impl.ts:80:11)
    at async invokeHttpAction (../../node_modules/convex/src/server/impl/registration_impl.ts:442:0)
    at async <anonymous> (../../node_modules/convex/src/server/router.ts:322:16)'


Here is the default provider setup from auth.ts I am using:

    Twitter({
      clientId: convexEnv.TWITTER_CLIENT_ID,
      clientSecret: convexEnv.TWITTER_CLIENT_SECRET,
    })


Any idea?
Was this page helpful?