Authentication for native applications Skip to main content
https://support.okta.com/help/answers?id=9062a000000bmegqay&refurl=http%3a%2f%2fsupport.okta.com%2fhelp%2fanswers
How satisfied are you with the Okta Help Center?
Thank you for your feedback!
How satisfied are you with the Okta Help Center?
1
2
3
4
5
Very Dissatisfied
Very satisfied
Enter content less than 200 characters.
Ask Search:
Mark BMark B 

Authentication for native applications

Hi.

My company is a division of a much larger company that uses Okta extensively. My team is getting ready to do a rewrite of an old system. Our front-end clients will be native Windows 10 applications. Ideally, clients will authenticate with Okta to be able to access our web services. These WILL NOT be web-based clients. The client machines will be locked-down. Users will not be able to use any application except ours -- not even a browser.

Is it possible to leverage Okta under these circumstances? If so, what is the best way?

Thanks.
Raphael LondnerRaphael Londner (Okta, Inc.)
Hi Mark,

If you are building Windows 10 apps, you are likely building them using C#, right?

If that's the case, I suggest you take a look at our .NET SDK, available as a NuGet package (https://www.nuget.org/packages/Okta.Core.Client/) or on GitHub (https://github.com/okta/oktasdk-csharp) for the source code. We also provide a C# code sample (https://github.com/oktadeveloper/okta-sdk-dotnet-console-auth-flow) demonstrating the use or Authentication API using that SDK if that can help you get started.

Does that help? Please let us know.
Mark BMark B
Hi Raphael,

The C# code sample that you linked doesn't appear to have any code. Am I looking at the wrong project?

Thanks,

Mark
 
Raphael LondnerRaphael Londner (Okta, Inc.)
Hi Mark,

Do you see the Program.cs code file at https://github.com/oktadeveloper/okta-sdk-dotnet-console-auth-flow/blob/master/Program.cs?

Thanks,

Raphael.
Mark BMark B
ah! now I do. Looks like it was just checked in an hour ago :)
 
Mark BMark B
This is a huge help! Thanks!

My next step will be authorizing access to a web service from an app like this console example. Where can I look for information on how to do that?

Thanks!!


 
Raphael LondnerRaphael Londner (Okta, Inc.)
Hi Mark,

I know this comes as a late answer, but it took me some time to go through some hoops to get this code sample published. In your scenario, you'd rather look at our OpenID Connect feature combined with our API Access Management (http://developer.okta.com/use_cases/api_security/" target="_blank) product, which is Okta' implementation or OAuth 2.0.

The code sample I previously discussed is available on GitHub (https://github.com/oktadeveloper/okta-oauth-nativewindows" target="_blank) and is an example of a console-based app leveraging the default OS browser (and potentially an existing Okta session if the user is already logged in) to authenticate the user and let him acquire an ID Token as well as, optionally, an Access Token that can be used against a web service ("resource server" in OAuth lingo) that leverages that access token for authentication and authorization purposes.

The Resource Server/Web Service code sample is not fully ready yet (it still has to be fully code reviewed and approved by legal) but I hope to have it available soon. You can start playing around with the console app above though. I look forward to your feedback!