File tree Expand file tree Collapse file tree 1 file changed +17
-5
lines changed
integration-tests/testkit Expand file tree Collapse file tree 1 file changed +17
-5
lines changed Original file line number Diff line number Diff line change @@ -57,10 +57,17 @@ const signUpUserViaEmail = async (
5757 }
5858} ;
5959
60- const createSessionPayload = ( superTokensUserId : string , email : string ) => ( {
60+ const createSessionPayload = ( payload : {
61+ superTokensUserId : string ;
62+ userId : string ;
63+ oidcIntegrationId : string | null ;
64+ email : string ;
65+ } ) => ( {
6166 version : '1' ,
62- superTokensUserId,
63- email,
67+ superTokensUserId : payload . superTokensUserId ,
68+ userId : payload . userId ,
69+ oidcIntegrationId : payload . oidcIntegrationId ,
70+ email : payload . email ,
6471} ) ;
6572
6673const CreateSessionModel = z . object ( {
@@ -89,15 +96,20 @@ const createSession = async (
8996 ] ,
9097 } ) ;
9198
92- await internalApi . ensureUser . mutate ( {
99+ const { user } = await internalApi . ensureUser . mutate ( {
93100 superTokensUserId,
94101 email,
95102 oidcIntegrationId,
96103 firstName : null ,
97104 lastName : null ,
98105 } ) ;
99106
100- const sessionData = createSessionPayload ( superTokensUserId , email ) ;
107+ const sessionData = createSessionPayload ( {
108+ superTokensUserId,
109+ userId : user . id ,
110+ oidcIntegrationId,
111+ email,
112+ } ) ;
101113 const payload = {
102114 enableAntiCsrf : false ,
103115 userId : superTokensUserId ,
You can’t perform that action at this time.
0 commit comments