question

aditi-test12837 avatar image
aditi-test12837 asked ·

How can I login the user inside the widget once I have the access token?

Hi,
I am new in this segment and looking for your help to implement login flow in which user will login only once and then our web server will catch the access_token. Now I want to know that do we have a method in which I can login the user in the widget using the saved access token. Please help 
General Topic
1 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Embbnux Ji avatar image
Embbnux Ji answered ·
Hi, @ aditi test you can try In-page login mode  https://github.com/ringcentral/ringcentral-embeddable/blob/master/docs/sso-login-mode.md When user had logged with RingCentral OAuth page, it would auto logged in the widget.
1 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

aditi-test12837 avatar image
aditi-test12837 answered ·
Hi Embbnux,
thanks for your reply, I have tried it, but it's giving me error "No Auth Code". I tried a lot but, I am not able to find a solution for the same. 
1 comment
1 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Hi, @aditi test Can you show how you implement this and screenshot or other details. It seems a bug in In-page login mode.  
0 Likes 0 ·
Oleg avatar image
Oleg answered ·

Hi,

I also tried to implement In-page login mode. I was able to get access_token(and saved it in DB), but I don't understand what should I pass instead of "your_app_key". I tried to pass there access_token, clientId and etc, but I always got "error" : "invalid_client"

https://ringcentral.github.io/ringcentral-embeddable/adapter.js?authMode=sso&appKey=your_app_key

Could you please explain what should I pass into appKey?

1 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Embbnux Ji avatar image
Embbnux Ji answered ·

Hi, @Oleg In in-page login, we are reusing alive session in RingCentral login page. If user login in somewhere of current browser, when user goto widget with in-page login, widget will redirect to RingCentral login page. If session is still alive, RingCentral login page will redirect back with access token. We require app key for using same alive session. You don't need to pass access token to widget.

For error "invalid client", can you check your appKey. It is caused by wrong appKey. Is you app id in production environment. If your app id in on sandbox, you need to pass appServer "https://platform.devtest.ringcentral.com"

1 comment
1 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Hi @Embbnux Ji, Thanks for your explanations, now I understand how it works. I will try to implement it

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.