Question

Can we login in Javascript webphone app without reaching Ringcentral Authentication server?

  • 18 August 2020
  • 1 reply
  • 580 views

We are implementing Web-phone of Ring central for which we have created a sandbox account and added digital line to it.

As we took the reference with the Auth flow from Demo Application, we are supposed are do below steps

1) After entering Client Id, Client Secret and Submitting the form.

2) Login using Phone number & Password of the Console App .3) Once logged in , We need to click a button Authorize .4) Once authorized, We need to confirm the Emergency Address.

The above steps 2, 3, 4 are happening in a different page(urls) which we cannot skip.

The challenge is as we need to implement this in our own web application, we should not have these 2, 3, 4 steps to be happening in other pages.

Is there any way to use Auth Flow without these steps or any inbuilt API which automatically takes care of these.

If not please suggest or guide us the best way to achieve this. As password flow is not allowed to be done from Java-script App.


1 reply

Hi Prakash, the only way to skip popup login is to use password grant flow or customize code flow.


For password, we don't have UI for password login now. You can run following js code inside Embeddable'f iframe to test:

 phone.auth.login({username: 'your_phone_number', extension: 'your_extension', password: 'password' })`

And Remember to set Embeddable to use your own app client id and secret. Your RingCentral app need to support password grant flow. You can check it in `developer.ringcentral.com`.

For auth code flow, you can also customize it by passing authorization code to it directly. https://github.com/ringcentral/ringcentral-embeddable/blob/master/docs/customize-authorization.md

BTW, for web app, password grant flow is not recommended. As we need to keep user's credentials safe. So it is not recommended to use it in iframe.

Reply