himanshukukreja_
02/02/2023, 4:42 AMrp_st
02/02/2023, 5:35 AMcreateUserIdMapping
which you can use: https://supertokens.com/docs/nodejs/modules/index.html#createUserIdMappingrp_st
02/02/2023, 5:37 AMhimanshukukreja_
02/03/2023, 4:26 AMuserid_mapping
table (to store the supertokens_user_id and external_database_id), at the time of first-time signup (both third party and email password ) the user id that I get from` session.get_user_id()` or session.user_id
is my supertokens id after the signup when we get logged out and again sign In we get the external database id. Why is this so?? Or Is there any method to override this change?rp_st
02/03/2023, 5:42 AMhimanshukukreja_
02/03/2023, 5:50 AM*userid_mapping
and making a SQL query call to itrp_st
02/03/2023, 5:52 AMhimanshukukreja_
02/03/2023, 5:54 AMrp_st
02/03/2023, 5:55 AMrp_st
02/03/2023, 5:56 AMhimanshukukreja_
02/03/2023, 6:08 AMoverride_thirdpartyemailpassword_apis(original_implementation: APIInterface)
function but now I have to implement the mapping logic in override_thirdpartyemailpassword_functions(original_implementation: RecipeInterface)
functionrp_st
02/03/2023, 6:51 AMhimanshukukreja_
02/03/2023, 9:32 AMthirdparty_sign_in_up_post
or thirdparty_sign_in_up
???rp_st
02/03/2023, 9:44 AMrp_st
02/03/2023, 9:44 AMhimanshukukreja_
02/03/2023, 10:10 AMthirdparty_sign_in_up
and emailpassword_sign_up
of override_thirdpartyemailpassword_functions(original_implementation: RecipeInterface)
function but still the same problem persists thatis the at the time of first sign_up session.user_id givessupertokens_id while after logging out and then at the time of signIn session.user_id gives external_id. I am attaching my code snipped where I have implemented override_thirdpartyemailpassword_functions
himanshukukreja_
02/03/2023, 10:12 AMhimanshukukreja_
02/03/2023, 10:13 AMrp_st
02/03/2023, 10:21 AMhimanshukukreja_
02/03/2023, 10:26 AMrp_st
02/03/2023, 10:26 AMrp_st
02/03/2023, 10:26 AMrp_st
02/03/2023, 10:26 AMhimanshukukreja_
02/03/2023, 10:46 AMhimanshukukreja_
02/03/2023, 10:48 AMrp_st
02/03/2023, 12:00 PMhimanshukukreja_
02/06/2023, 12:11 PMfrom supertokens_python.asyncio import create_user_id_mapping
. I have used this function inside the function overrides of emailpassword_signup and thirdparty_signin_up
After the mapping I have used the api overrides in order to store the additional session information in my custom table. There is a problem of synchronizarion of this function (create_user_id_mapping
) as in some cases mapping is done successfully before the calling of functions which I have written inside the api overrides while sometimes there is no mapping at the time of calling api override function. Thus it causes inconsistency. I am attaching the snippet of my code. Also If I uses the custom function for mapping, all things are running smoothly with no problem of synchronizationhimanshukukreja_
02/06/2023, 12:12 PMrp_st
02/06/2023, 12:14 PMawait
when calling the create_user_id_mapping
functionhimanshukukreja_
02/06/2023, 12:17 PMrp_st
02/06/2023, 12:18 PMrp_st
02/06/2023, 12:18 PMhimanshukukreja_
02/06/2023, 12:30 PMrp_st
02/06/2023, 12:46 PM