Author Message
rredekar.avaya.com
Joined: Apr 17, 2020
Messages: 7
Offline
Hi,

I'm using JavaScript SDK(v-4.4.0.14). I have tested following scenario with communication sample app

1. Add correct AAWG serve address with port number.
2. Add wrong user credential.
3. After click on Login button it's immediately shown sign in prompt with username and password but registration failed event is not getting captured in addOnUserRegistrationFailed callback.

Please let me know what I missing here so, I can able to capture registration failed event.
minioc
Joined: Mar 11, 2020
Messages: 7
Offline
Hi rredekar!

We're currently working to get the best answer to your question. We'll get back to you as soon as we have a response.

Thank you!
Charly - JSCSDK Dev Team.
minioc
Joined: Mar 11, 2020
Messages: 7
Offline
Hi again rredekar,

The api that I think you're looking for is the addOnInvalidCredentialsCallback. The callbacks will be fired once you press "Cancel" on the sign in prompt.

I hope this is useful. If not, let me know.

Thank you!
Charly - JSCSDK Dev Team
rredekar.avaya.com
Joined: Apr 17, 2020
Messages: 7
Offline
Thanks Minioc for reply,

In our scenario, we don't want to show any alert or prompt so, we are blocking them. Is there any other way we can get that event without clicking on the cancel button?

Also, I have tried addOnInvalidCredentialsCallback callback instead of addOnUserRegistrationFailed on user object but getting Uncaught TypeError: this._user.addOnInvalidCredentialsCallback is not a function.

let me know what I missing.
rredekar.avaya.com
Joined: Apr 17, 2020
Messages: 7
Offline
Hi Minioc,

any update on this?
rredekar.avaya.com
Joined: Apr 17, 2020
Messages: 7
Offline
Hello Minioc,

Following are the observations with the Avaya SDK that we are using :
We are not getting a specific event that server connection failed or user authorization failed from the SDK.
For user authorization failed, we can not rely on prompt because we need to send the same event to integrated other application.


Following are the events received in different scenarios:

Scenario 1 - Invalid AAWG server details
Callback received in couple of seconds
1. addOnCallsServiceUnavailableCallback
2. addOnUserRegistrationFailed : (Error parameter undefined) - Comes in this callback because Calls service did not get started

Scenario 2 - Invalid AADS server details
Callback received in couple of seconds
1. addOnContactsServiceUnavailableCallback
2. addOnUserRegistrationSuccessful : Comes in this callback because Calls service got started

Scenario 3 - Invalid AAWG and AADS server details
Callback received in couple of seconds
1. addOnCallsServiceUnavailableCallback
2. addOnUserRegistrationFailed : (Error parameter undefined) - Comes in this callback because Calls service did not get started
3. addOnContactsServiceUnavailableCallback

Scenario 4 - Invalid User credentials
Callback received in couple of seconds
1.User Credentials alert box gets loaded on browser immediately on Avaya application from Avaya library and cannot be controlled from application. Shown on Avaya application screen.
Callback received after around 30 seconds in :
2. addOnContactsServiceUnavailableCallback
3. addOnCallsServiceUnavailableCallback
4. addOnUserRegistrationFailed : (Error parameter undefined) - Comes in this callback because Calls service did not get started
JMiddleton
Joined: Apr 1, 2019
Messages: 86
Offline
rredekar,

Unfortunately the browser popup is a limitation of the solution with the way the authentication is occurring on the AAWG and AADS. It can't be prevented by the SDK or the application. The addOnInvalidCredentialsCallback will trigger but not until the user cancels the browser popup.

In the past other solutions have worked around this by pre-authenticating the credentials prior to attempting login with the SDK.
AlokKulkarni
Joined: Jan 5, 2017
Messages: 30
Offline
Hi Jeff,
Can you please elaborate how this Preauthentication of credentials can be done ?
Go to:   
Mobile view