I basically copied the template code and made some modification to pass it the AuthCode after the user has logged in and hit the redirect uri and the script was able to console print the authcode. I also put some console log in the registerCommand getAuthcode section but it never triggers.
Am I misunderstanding something in who does the getAuthcode get trigger as the comment did mention 'Messenger will call this command to get the the tokens'?
What additional code do I need to get to getAuthcode to execute?
AuthProvider.getAuthCode command not triggered tells me Messenger did not know that it need to call this command. This can happen when either configuration is not correct (authentication must be enabled) or Messenger did not know that your login is complete.
Also, is this with Stepup conversation enabled (upgrade anonymous conversation to authenticated one option in Messenger configuration)? Suggest publishing AuthProvider.signIn event as documented here. This will let Messenger know that your sigIn is complete and should initialize Messenger starting with calling getAuthCode command.
I was able to finally get the AuthProvider.getAuthCode code to execute after I place the command in the Genesys('registerPlugin', 'AuthProvider', (AuthProvider)) function place.
The weird thing about this is that in one of my prototype (Prototype A) the execution of the getAuthCode and I was able to get the the Auth.authenticated details logged out to console.
In another prototype (ProtoType B) using the exactly the same code in Prototype A, the debug message returns No Configuration Found.
Both ProtoType A and ProtoType B are using the exactly the same Messenger Configuration and Messager Deployment.
The difference between the prototypes is that one is a local React project while the other is a javascript injection into a website. Both prototypes are able to communicate successfully with Genesys APIs but Prototype B returns No Configuration found even though there was no configuration changes between Prototype A and Prototype B.
No such that is different code-wise that would resulted in error for Prototype B. Any hints or tips are welcome. Thank you.