Step-up authentication during a web messaging conversation

image

We enable Step-up authentication in app configuration but not getting this highlighted user sing-in option need help on what all SDK/configuration changes required to get this same behavior we are on beta now. through SDK I'm able to authenticate successfully but when enable Step-up authentication it's not working as expected widget not showing sign in button it's same old widget interface.

Hi,

Could you check if you wrote the AuthProvider plugin with “signIn” command?
This is needed to let the Messenger widget know that the brand is not signed-in yet (although Messenger is initialized).

I have AuthProvider plugin but not **AuthProvider.signedIn** event, It's not there in my code can you help me, how to provide this inside my code.

Hi,

You may want to check this doc for a complete list of events/commands.

Regards,
V.P.

Hi @hvrthotapalli,

Also here is the relevant AuthProvider.signIn command documentation.

Sample code:

AuthProvider.registerCommand('signIn', (e) => { 

  // Write your logic to signIn

  // Messenger calls this command when Step-up conversation is enabled. This command will let Messenger know that the brand is not signed-in yet (although Messenger is initialized) and it can now try to sign-in later. Add necessary logic to trigger the login process by gathering the credentials from login form.

  if (signedInSuccessfully) {
  
   AuthProvider.publish('signedIn', data); // REQUIRED event {authCode: xxx, ...} - To let Auth plugin know and it will initialize GenesysJS
   
   e.resolve(data);

  // where 'data' is as discussed in the return data section here - https://developer.genesys.cloud/commdigital/digital/webmessaging/messengersdk/SDKCommandsEvents/authProviderPlugin#authprovider-signin

  } else {

   AuthProvider.publish('signInFailed', error); // REQUIRED event to let Messenger know that sign-in failed so it can reset its UI state
  }
});

Ideally, above sample code should have been available here, we are adding it now. Hope this helps, let us know if anything.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.