Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

passport-apple-tb

1.0.10 • Public • Published

passport-apple-tb

Passport strategy for authenticating with Apple using the OAuth 1.0a API.

This module lets you authenticate using Apple in your Node.js applications. By plugging into Passport, Apple authentication can be easily and unobtrusively integrated into any application or framework that supports Connect-style middleware, including Express.

Install

$ npm install passport-apple-tb

Usage

Create an Application

Before using passport-apple-tb, you must first get an apple key. If you have not already done so, an API key can be requested at internal. Your will be issued an API key and secret, which need to be provided to the strategy.

Authenticate Requests

Use passport.authenticate(), specifying the 'apple' strategy, to authenticate requests.

For example, as route middleware in an Express application:

app.get('/auth/apple',
  passport.authenticate('apple'));

app.get('/auth/apple/callback', 
  passport.authenticate('apple', { failureRedirect: '/login' }),
  function(req, res) {
    // Successful authentication, redirect home.
    res.redirect('/');
  });

Install

npm i passport-apple-tb

DownloadsWeekly Downloads

4

Version

1.0.10

License

MIT

Unpacked Size

6.86 kB

Total Files

5

Last publish

Collaborators

  • avatar