Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
passport-okta-oauth20
Advanced tools
An Okta OAuth 2.0 Strategy for Passport with native TypeScript support
Okta OAuth 2.0 provider for Passport with TypeScript support.
npm i passport-okta-oauth20
or yarn add passport-okta-oauth20
.
import { Strategy as OktaStrategy } from 'passport-okta-oauth20';
passport.use(
new OktaStrategy(
{
audience: 'https://acme.okta.com',
clientID: 'oa6qp1vkvrgwABC12345',
clientSecret: 'qwertyA-fooBazB_DQSS-qqsQSD123',
scope: ['openid', 'email', 'profile'],
callbackURL: 'http://localhost:3000/api/auth/okta/callback',
},
function (accessToken, refreshToken, profile, done) {
// Do something with the profile
return done(null, profile);
}
)
);
You can also specify the property authorizationId
to turn the authorizationURL from https://acme.okta.com/oauth2/v1/authorize
to https://acme.okta.com/oauth2/foobar/v1/authorize
if:
authorizationId
is foobar
, andaudience
is https://acme.okta.com
This is optional.
{
id: 'azerty12345890',
displayName: 'Adam Smith',
username: 'adam@smith.com',
fullName: 'Adam Smith',
familyName: 'Smith',
givenName: 'Adam',
email: 'adam@smith.com',
zoneInfo: 'America/Los_Angeles',
updatedAt: 1625319840,
emailVerified: true,
locale: 'en-US',
_raw: '{"sub":"azerty12345890", ...',
_json: Object // Raw response from Okta
}
If you are using TypeScript, you can import the following types:
import { OktaProfile, OktaStrategyOptions } from 'passport-okta-oauth20'
authorizationId
, to use a custom authorisation server. 👏 Thanks @fpunny for the PR (#6)..npmignore
by a whitelist (files
) in package.json
This repository is loosely based on passport-okta-oauth.
That repository was archived a while ago, and this rewrite brings the following changes:
FAQs
An Okta OAuth 2.0 Strategy for Passport with native TypeScript support
We found that passport-okta-oauth20 demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.