@@ -30,7 +30,7 @@ export const handler = async (event) => {
3030 return event ;
3131 }
3232
33- event = await handleUserMigration ( event ) ;
33+ event = await handleUserMigration ( event , token ) ;
3434
3535 const { success, errorMessage } = await Jane . createUser ( {
3636 pool_id : event . userPoolId ,
@@ -51,7 +51,7 @@ export const handler = async (event) => {
5151 instead we handle those migrations here, after signup.
5252 If a user is signing up via sso, we check for a Jane SSO user
5353 associated with this client and use that users data for the migration */
54- const handleUserMigration = async ( event ) => {
54+ const handleUserMigration = async ( event , token ) => {
5555 let userIdentities ;
5656 try {
5757 userIdentities = JSON . parse ( event . request . userAttributes . identities ) ;
@@ -69,9 +69,9 @@ export const handler = async (event) => {
6969
7070 const { errorMessage, user } = await Jane . verifySSOUser ( {
7171 email : event . request . userAttributes . email ,
72- userAttributes : event . request . userAttributes ,
73- appClientId : event . callerContext . clientId ,
74- } ) ;
72+ user_attributes : event . request . userAttributes ,
73+ app_client_id : event . callerContext . clientId ,
74+ } , token ) ;
7575 if ( errorMessage === "User not found" ) {
7676 // Jane user for this client was not found, continue normal sign up
7777 return event ;
0 commit comments