Giter VIP home page Giter VIP logo

example-gated-content-with-okta's Introduction

Okta + Netlify Authentication

This is an example of using Okta's Login Widget to provide access control for a Netlify site.

Try it out on your own account via this link:

Deploy to Netlify

You must make sure to deploy the site to an account with the JWT based visitor access control enabled.

Setting Up

Make sure you have an Okta account and a URL for that account.

Then create a new Application inside Okta. Choose Single Page application.

Create a new API Token and keep it handy.

Then click the deploy button above. Once you've authenticated with GitHub, you will be asked to fill in the following variables:

  • OKTA_BASE_URL this is the URL of your Okta account, ie: https://dev-679417.oktapreview.com
  • OKTA_API_TOKEN this is the API token created above
  • OKTA_CLIENT_ID the client id for the Okta application created above
  • JWT_SECRET either the JWT_SECRET set globally for your Netlify team, or a long random token

Once the site has been created, go to site settings, and transfer the site to a team with JWT based visitor access control enabled. If you don't have a global JWT secret for the team, go to Access Control under settings and configure the JWT Secret to be the same as in the step above.

Then go to "Trusted Origins" under "API" in Okta and add a new Trusted Origin. Enter a title, the URL of your new site, and check both the CORS and Redirect boxes.

example-gated-content-with-okta's People

Contributors

biilmann avatar calavera 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.