Sronds
CCConvex Community
•Created by uma on 3/29/2025 in #support-community
callback, 3rd party authentication, convexAuth
My end result looks something like this
60 replies
CCConvex Community
•Created by uma on 3/29/2025 in #support-community
callback, 3rd party authentication, convexAuth
I managed to solve it by patching the users.js convex implementation.
I now pass the existingSessionId in the callback
async createOrUpdateUser(ctx, args)
which i then use to check if there's an existing session and use that to link the accounts together. If there is no existing session and the provider is not one of my linking ones, then i just return undefined in the callback so that the defaultCreateOrUpdateUser
function continues the logic.60 replies
CCConvex Community
•Created by uma on 3/29/2025 in #support-community
callback, 3rd party authentication, convexAuth
I get the following log after signing in
is there perhaps a way to connect to use that existingSessionId to link the accounts?
60 replies
CCConvex Community
•Created by uma on 3/29/2025 in #support-community
callback, 3rd party authentication, convexAuth
okay just a quick follow up, this flow creates a new user to the database with tiktok as the provider but that's not necessarily what i'm trying to do. My goal is to 'link' the tiktok account to the existing user that had already signed in similar to what OP was trying to do i believe. How different do you reckon the flow should be compared to what we have right now? @erquhart
60 replies
CCConvex Community
•Created by uma on 3/29/2025 in #support-community
callback, 3rd party authentication, convexAuth
if anyone in the future is struggling with this, the fix is to go to
node_modules/@convex-dev/auth/dist/server/oauth/callback.js
and update
to
60 replies
CCConvex Community
•Created by uma on 3/29/2025 in #support-community
callback, 3rd party authentication, convexAuth
❤️ ❤️ ❤️
60 replies
CCConvex Community
•Created by uma on 3/29/2025 in #support-community
callback, 3rd party authentication, convexAuth
that. worked. tysm @erquhart, i was going mad
60 replies
CCConvex Community
•Created by uma on 3/29/2025 in #support-community
callback, 3rd party authentication, convexAuth
i've traced it to this error:
60 replies
CCConvex Community
•Created by uma on 3/29/2025 in #support-community
callback, 3rd party authentication, convexAuth
this is my patch file
60 replies
CCConvex Community
•Created by uma on 3/29/2025 in #support-community
callback, 3rd party authentication, convexAuth
yeah still getting the same error even when returning false
60 replies
CCConvex Community
•Created by uma on 3/29/2025 in #support-community
callback, 3rd party authentication, convexAuth
imma try again real quick
60 replies
CCConvex Community
•Created by uma on 3/29/2025 in #support-community
callback, 3rd party authentication, convexAuth
but didn't get much luck with getting a different error message although it could've been because i didn't patch it properly
60 replies
CCConvex Community
•Created by uma on 3/29/2025 in #support-community
callback, 3rd party authentication, convexAuth
but i tried patching it myself
60 replies
CCConvex Community
•Created by uma on 3/29/2025 in #support-community
callback, 3rd party authentication, convexAuth
your pr hasn't been merged in yet
60 replies
CCConvex Community
•Created by uma on 3/29/2025 in #support-community
callback, 3rd party authentication, convexAuth
@erquhart
60 replies
CCConvex Community
•Created by uma on 3/29/2025 in #support-community
callback, 3rd party authentication, convexAuth
the reason i think this error is related to op's message is because i get this as the response after going through the process of confirming the login on tiktok.
https://bright-shark-383.convex.site/api/auth/callback/tiktok?code=6Be6A-lAdB9_CRbJ5HvibBKpM44QmFKWLY6cAmmb9hLj1jviZCMzK4iAsy8yVNLQCXXidcRutCH-wS6p2PHynC18hH7dwkfKjx4lPcwL7ndRcg9kba2-nuTes-gvE0zloF0ZvLzOB4bYbBKOkaXujrotbLW-qqZR688A8aYVYEayg0zqcSG7iZUALAss6lmQ2JsS5QkYfWVbZ2WdqFmsyML5F4MHVofQT_5KSFvf04w%2A2%215730.e1&scopes=user.info.basic%2Cuser.info.profile
but then for some reason it fails and returns the error
'"response" body "access_token" property must be a string
and the full flow never completes
and i thought it could be related to the code param60 replies
CCConvex Community
•Created by uma on 3/29/2025 in #support-community
callback, 3rd party authentication, convexAuth
i'm just doing
and my auth.ts file looks like this
60 replies
CCConvex Community
•Created by uma on 3/29/2025 in #support-community
callback, 3rd party authentication, convexAuth
60 replies
CCConvex Community
•Created by uma on 3/29/2025 in #support-community
callback, 3rd party authentication, convexAuth
I already have the user logging in through Gmail this was just me trying to get them to “connect”/“link” their account so that I could verify that they indeed owned the account
60 replies
CCConvex Community
•Created by uma on 3/29/2025 in #support-community
callback, 3rd party authentication, convexAuth
But I’m just using it cause I thought it would be easy to implement, my actual goal is just to get the user to verify they own the TikTok account (was planning to do Instagram & YouTube later too the same way)
60 replies