Code Monkey home page Code Monkey logo

flutter_okta's Introduction

flutter_okta

Create dev account

You can create Developer Edition Account at https://developer.okta.com/signup/

Okta rest api

https://developer.okta.com/code/rest/

Register

curl -v -X POST \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: SSWS ${api_token}" \
-d '{
  "profile": {
    "firstName": "Isaac",
    "lastName": "Brock",
    "email": "[email protected]",
    "login": "[email protected]",
    "mobilePhone": "555-415-1337"
  },
  "credentials": {
    "password" : { "value": "tlpWENT2m" }
  }
}' "https://${yourOktaDomain}/api/v1/users?activate=true"

Social login

https://developer.okta.com/docs/guides/add-an-external-idp/google/before-you-begin/

Google

https://developer.okta.com/docs/guides/add-an-external-idp/google/create-an-app-at-idp/

  • Create an App at the Identity Provider
  • Create an Identity Provider in Okta
  • Access: https://dev-xxxxxxx-admin.okta.com/dev/console
  • Hover over Users and then select Social & Identity Providers
  • Add Identity Provider -> Add an Identity Provider -> Add Google
  • Fill Client ID and Client Secret from previous step (Google OAuth credentials)
  • Register an App in Okta
  • In your Okta org, click Applications, and then Add Application
  • Select the appropriate platform for your use case, enter a name for your new application, and then click Next.
  • In Allowed grant types: Enable Implicit + Check both Allow ID Token with implicit grant type + Allow Access Token with implicit grant type
  • Add Custom Login redirect URIs: okta://com.okta.dev-xxxxxxx
  • Scroll to the Client Credentials section and copy the client ID that you use to complete the Authorize URL in the next step
  • Create the Authorization URL https://${yourOktaDomain}/oauth2/v1/authorize?idp=0oaaq9pjc2ujmFZexample&client_id=GkGw4K49N4UEE1example&response_type=id_token%20token&response_mode=fragment&scope=openid&redirect_uri=${Login redirect URI}&state=any&nonce=any&prompt=login

After successful authentication, the user is redirected to the redirect URI that you specified, along with an #id_token= and &access_token fragment in the URL Get user info from access token:

curl --location --request GET 'https://dev-xxxxxxx.okta.com/oauth2/v1/userinfo' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer access_token'

flutter_okta's People

Contributors

nhancv avatar

Watchers

 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.