Socket
Socket
Sign inDemoInstall

@davidzemon/passport-okta-oauth

Package Overview
Dependencies
22
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Install Socket

Protect your apps from supply chain attacks

Install

@davidzemon/passport-okta-oauth

Passport strategy for authenticating with Okta using OAuth 2.0.

    0.0.5latest
    GitHub
    npm

Version published
Maintainers
1
Weekly downloads
43,330
increased by9.43%

Weekly downloads

Readme

Source

passport-okta-oauth

Passport strategies for authenticating with Okta using OAuth 2.0.

Basic Setup

passport.use(new OktaStrategy({
  audience: process.env.OKTA_AUDIENCE,   
    // audience is the Okta Domain, 
    // e.g. https://example.okta.com, https://example.oktapreview.com
    
  clientID: process.env.OKTA_CLIENTID,
    // clientID is the public Okta Application Client Credentials, 
    // its a 20 character alphanumeric string
    // e.g. U7VYvsaiuqlDOHjIVTIA  (generated example)

  clientSecret: process.env.OKTA_CLIENTSECRET,
    // clientSecret is the private Okta Application Client Credentials, 
    // its a 40 character alphanumeric string with a hypen(s).
    // e.g. Vwb-R4fQnSH7uJkokDhPI-WR4qEiuWFokYANM5C  (generated example)
    
  idp: process.env.OKTA_IDP,
    // idp is the Identity Provider (id). This is an optional field
    // its a 20 character alphanumeric string
    // e.g. qOp8aaJmCEhvep5Il6ZJ  (generated example)
    
  scope: ['openid', 'email', 'profile'],
  response_type: 'code',
  callbackURL: baseURL + "/auth/okta/callback"
    // callbackURL is the redirect URL Okta should return the user to
    // This is a URL on your server
    
}, function(accessToken, refreshToken, profile, done) {
  // Example Callback to Handle the Profile Object

  return profile
}));

Profile Object

  profile = {
    provider: 'okta-social',
    name: {
      fullName:   'John Smith',
      familyName: 'Smith',
      givenName:  'John'
    },
    emails: [{value: 'john.smith@example.com'}],
    _raw: "\{...\}"
    _json: {...}
  }

Keywords

FAQs

Last updated on 06 Jul 2022

Did you know?

Socket installs a GitHub app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc