Giter Site home page Giter Site logo

satishfied / okta-dotnet-password-token-example Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nbarbettini/okta-dotnet-password-token-example

0.0 1.0 0.0 13 KB

An example of using the Okta OAuth2 API to generate a JWT for a user

C# 100.00%

okta-dotnet-password-token-example's Introduction

Simple Okta password flow example

This example demonstrates how to use the Okta OAuth 2.0/OpenID Connect API to generate an access token (JWT) for a user.

In order to run the sample, you must add some information to App.config:

  • Set OktaOrgHref to your Okta organization URL, like https://dev-123456.oktapreview.com.
  • Generate an API token (Security - API - Tokens) and paste it in the OktaApiToken setting.
  • If you haven't already, create a Native OpenID Connect application (Applications - Create New App - Native). The callback URI can be a dummy URI for now. Edit the general settings and enable the Resource Owner Password flow. Edit the credentials settings and switch to Client Authentication. Copy the Client ID into the OktaAppClientId setting, and the Client Secret to the OktaAppClientSecret setting.
  • If you haven't already, create an Authorization Server (Security - API - Authorization Servers). The name and resource URI don't matter for now. Copy the end of the Issuer URI, after .oktapreview.com/oauth2/ into the OktaAuthorizationServerId setting. The ID will look like aus8h593.

Create a test user (Directory - People) with an email address you control, and then use Reset Password to send a password reset email. Use the password reset flow (in a new browser or incognito window) to create a real password for your test user. Then, assign them to your application (Applications - [your app] - People).

Now you're ready to try out the sample! Build the project and run it to step through the flow.

okta-dotnet-password-token-example's People

Contributors

nbarbettini avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.