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.
oauth2-server-grant-type-apple
Advanced tools
Adds Apple grant type for oauth2-server
Using Yarn
yarn add oauth2-server-grant-type-apple
Using NPM
npm install oauth2-server-grant-type-apple
Add getUserWithApple
to oauth2-server model.
const getUserWithApple = async (jwtData) => {
// Find and return user by Apple ID (sub in jwtData)
// Find and return user by Apple email
// If not exists create new user
}
Add Apple grant type to extendedGrantTypes
in oauth2-server options:
import AppleGrantType from 'oauth2-server-grant-type-apple';
const options = {
model: ...,
extendedGrantTypes: {
apple: AppleGrantType,
}
requireClientAuthentication: {
apple: false,
},
}
You need to provide Apple App ID in model appleGrantType
:
const options = {
model: {
...model,
appleGrantType: {
appId: 'com.example.apple.login' // Array also supported
},
},
}
Post request to /oauth/token
with apple
grant type and provided token:
{
"grant_type": "apple",
"client_id": "YOUR_CLIENT_ID",
"apple_token": "APPLE_JWT_TOKEN",
"name": "User full name"
}
The package is available as open source under the terms of the MIT License.
FAQs
Apple grant type for oauth2-server
We found that oauth2-server-grant-type-apple 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.