Socket
Book a DemoInstallSign in
Socket

@sephora-okta/okta-nodejs-sdk

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sephora-okta/okta-nodejs-sdk

okta-nodejs-sdk

1.0.10
latest
npmnpm
Version published
Maintainers
1
Created
Source

安装

npm install @sephora-okta/okta-nodejs-sdk

使用

const OKTAsdk = require("@sephora-okta/okta-nodejs-sdk")

const okta = new OKTAsdk({
    client_id: "",
    client_secret: "",
    redirect_uri: "",
    scope: "",
    response_mode: "",
    state: "",
})

// 生成认证地址
let url = okta.getAuthorizationUrl()

  • async 调用

根据code获取accesstoken

const token = await okta.getAccessTokenByCode("code")

根据refresh_token获取access_token

const token = await okta.getAccessTokenByRefreshToken("refresh_token")

根据password获取access_token

const token = await okta.getAccessTokenByPassword("username", "password")

根据access_token获取用户信息

const user = await okta.getUserInfoByAccessToken("token")

示例

const oktaFun = async () => {
    const tokenObj = await okta.getAccessTokenByCode("code")
    const user = await okta.getUserInfoByAccessToken(data.access_token)
}
oktaFun()

FAQs

Package last updated on 22 Nov 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.