passport-apple-multi-tenant
v0.0.2
Published
Passport strategy for Sign in with Apple - Tenant Configuration Based
Downloads
27
Maintainers
Readme
Request Context Based and Multi Tenant Sign in with Apple for Passport.js
This strategy integrates Apple login. Is useful specially when you're trying to use it with NestJS Passaport Module, where you don't have so much control of passport instances and uses.
Installation
npm install --save passport-apple-multi-tenant
Usage
Strategy Options
clientInfoGenerator
: Function/Async Function which will return the following properties:clientID
: Apple OAuth2.0 Client IDteamID
: Apple Developer Team IDkeyID
: Apple Key IDkey
: Contents of the Apple Key. If you want the library to load the contents, usekeyFilePath
instead.keyFilePath
: File path to Apple Key; library will load content usingfs.readFileSync
scope
: An array of scopes, e.g.,['email', 'name']
callbackURL
: Callback URL configured and authorized on your apple service provider
authorizationURL
: (Optional) Authorization URL; default ishttps://appleid.apple.com/auth/authorize
tokenURL
: (Optional) Token URL; default ishttps://appleid.apple.com/auth/token
sessionKey
: (Optional) Session Keystate
: (Optional) Should state parameter be usedpassReqToCallback
: (Optional) Should request be passed to thevalidate
callback; default isfalse
Validate Callback
The validate
callback is called after successful authentication and contains the accessToken
, refreshToken
, and profile
.
License
Licensed under MIT.