corey-tenney9911 avatar image
corey-tenney9911 asked Tyler Liu commented

Using Code/Token Path for SSO in Windows Form Application

I have written a Windows Forms app in C#, and everything works great in the sandbox. However after talking to RingCentral about SSO we apparently cannot just use the Token path to authenticate. Now that I am digging into the Code/Token path it seems this is only for Web Applications.

1. Has anybody used the Code/Token path in a windows form? If so... how?

2. Any other ideas for SSO to work without using Code/Token path?

log in
1 |3000

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

1 Answer

Tyler Liu avatar image
Tyler Liu answered Tyler Liu commented
For "Code/Token" are you talking about the Authorization Code flow ?

For Windows form, you can embed a web browser widget and let user do authorization there. You can set redirectUri to localhost or whatever uri. Because you can access the address of the web browser widget to get the auth code no matter what is the redirectUri.
1 |3000

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

Tyler yes thats the code flow.  Its been about 20+ years since I did any Windows Forms stuff... so I really appreciate the information.
0 Likes 0 ·
Tyler, can I use the RingCentral Nuget Package to do Code flow?  I didnt see a way to do it.
0 Likes 0 ·
Yes, here is sample code:

Note: the sample code is using Nancy as local http sever to interpret the redirect uri. You don't need a local http server because you can access the web browser widget's address bar to get the redirect url directly.
0 Likes 0 ·
I dont suppose you have the config.json?? its not in the github
0 Likes 0 ·
Tyler, I found one for the SDK.. not the Client... are they the same?
0 Likes 0 ·
Show more comments

Developer sandbox tools

Using the RingCentral Phone for Desktop, you can dial or receive test calls, send and receive test SMS or Fax messages in your sandbox environment.

Download RingCentral Phone for Desktop:

Tip: switch to the "sandbox mode" before logging in the app:

  • On MacOS: press "fn + command + f2" keys
  • On Windows: press "Ctrl + F2" keys