
Security News
How Enterprise Security Is Adapting to AI-Accelerated Threats
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.
@universal-packages/authentication-apple-module
Advanced tools
Authentication module to handle apple authentication.
npm install @universal-packages/authentication-apple-module
Enable the apple module in your authentication instance.
import { Authentication } from '@universal-packages/authentication-apple-module'
const authentication = new Authentication({
dynamicsLocation: './src',
secret: 'my secret',
modules: {
apple: {
enabled: true,
options: {
teamId: '<your-team-id>',
clientId: '<your-client-id>',
keyId: '<your-key-id>',
p8Certificate: '<your-p8-certificate>'
}
}
}
})
await authentication.loadDynamics()
const result = await authentication.performDynamic('sign-in-with-apple', { code: '<your-code>' })
console.log(result)
// > { status: 'success', user: { id: 69, username: 'username', createdAt: [Date], appleId: '<your-apple-id>' } }
teamId String
Your apple team id.
clientId String
Your id of the service certificate you created in the apple developer console it looks like an app id but is not that one.
keyId String
The key id of the key you created in the apple developer console.
p8Certificate String
When you created your key you downloaded a p8 certificate file, you can provide the content of the file here.
p8CertificateLocation String
When you created your key you downloaded a p8 certificate file, you can provide the location of the file here.
These dynamics are required to be override to have a fully functional apple module.
Logic to find or create a user by apple id or email.
PAYLOAD Object
appleId Stringemail Stringlocale Stringtimezone StringRESULT UserWhen something goes wrong during the sign in with apple process.
PAYLOAD Object
message StringRESULT voidWhen the sign in with apple is successful.
PAYLOAD Object
user UserRESULT voidThis library is developed in TypeScript and shipped fully typed.
The development of this library happens in the open on GitHub, and we are grateful to the community for contributing bugfixes and improvements. Read below to learn how you can take part in improving this library.
FAQs
Universal authentication apple module
We found that @universal-packages/authentication-apple-module demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.