
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
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.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.