Legacy Dev Forum Posts

 View Only

Sign Up

Step-up authentication during a web messaging conversation

  • 1.  Step-up authentication during a web messaging conversation

    Posted 06-05-2025 18:38

    hvrthotapalli | 2024-09-17 11:29:37 UTC | #1

    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.


    David1 | 2024-09-17 13:57:39 UTC | #2

    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).


    hvrthotapalli | 2024-09-17 14:01:46 UTC | #3

    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.


    vpirat | 2024-10-16 20:26:47 UTC | #4

    Hi,

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

    Regards, V.P.


    RanjithManikanteSa | 2024-10-16 20:59:02 UTC | #5

    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.


    system | 2024-11-15 20:59:57 UTC | #6

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


    This post was migrated from the old Developer Forum.

    ref: 29362