question

corey-tenney avatar image
corey-tenney asked ·

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?
topic-default
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.

1 Answer

· Write an Answer
Tyler Liu avatar image
Tyler Liu answered ·
For "Code/Token" are you talking about the Authorization Code flow ?  https://devcommunity.ringcentral.com/ringcentraldev/topics/using-oauth-2-0-authorization-code-grant-...

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.
10 comments Share
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.

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:  https://github.com/ringcentral/ringcentral-demos-oauth/tree/master/csharp-nancy/csharp-client-nancy

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

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.