Using orCreateOrUpdate user in callback
Two problems here:
1. How can I get the tokenIdentity when creating a user, I need to get authSessionsId but I keep getting null.
my approach was
${url}/${userId}/${tokenId}
2. I keep getting a 302 error but everything is still working correctly.
GET /api/auth/signin/* 302
GET /api/auth/callback/* 302
This is the callback url I added on google:
https://my-stuff-123.convex.site/api/auth/callback/google
5 Replies
When an account is created, from the authTables - these are created
- authAccounts created (
with no emailVerified
)
- authRefreshTokens
- authSessions
- authVerifiers
args response:
Any help would be insanely appreciated!I keep getting a 302 error302 is not an error, it's a redirect (unfortunately our dashboard shows anything that's not 200 as red)
@Michal Srb Yeah I just realized earlier ;P, thank you.
But question while I have you here. What's the best way to get the tokenIdentity of a user being created through here?
I noticed its site_url/user_id/session_id but I can't seem to get the session ID on creation.
Why do you need the
tokenIdentifier
?
The session hasn't been created yet when createOrUpdateUser
runs, because the session stores the user ID, and the user might not have been created yet.It seemed standard from what I've been reading, bu no problem I can do without
Thank you again for your help!