Hello,
The gist is, I'm hoping someone can give me a tip on how to check whether the /auth/signinup api call has completed.
Here's the context:
I'm using third party login, and I overrode the thirdPartySignInUpPOST api to add logic to check whether a user with the given supertokens userId exists in my app's database. If no such user exists, it creates one. I refer to this api call as /auth/signinup.
I'm wondering if there is a way for me to check whether /auth/signinup has completed, because I have another call, /api/getUserData/, that I want to happen on login, to fetch user data, which as of now depends on the user data having been initialized in /auth/signinup.
I tried using Session.doesSessionExist to trigger my api call, but it appears that the session comes into existence before /auth/signinup has completed, because using doesSessionExist as a trigger results in this order of calls:
OPTIONS /auth/authorisationurl?thirdPartyId=google 204
GET /auth/authorisationurl?thirdPartyId=google 304
OPTIONS /auth/signinup 204
OPTIONS /api/getUserData 204
POST /api/getUserData 401
POST /auth/signinup 200
Any insight would be appreciated.