Skip to content

Commit

Permalink
feat: rewrite, bump deps, added sign in with apple
Browse files Browse the repository at this point in the history
  • Loading branch information
titanism committed Jun 2, 2022
1 parent 92f0000 commit 1888514
Show file tree
Hide file tree
Showing 7 changed files with 1,517 additions and 584 deletions.
3 changes: 3 additions & 0 deletions .remarkrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
plugins: ['preset-github']
};
5 changes: 5 additions & 0 deletions .xo-config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
prettier: true,
space: true,
extends: ['xo-lass']
};
18 changes: 14 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

* [Install](#install)
* [Usage](#usage)
* [Strategies](#strategies)
* [Options](#options)
* [Contributors](#contributors)
* [License](#license)
Expand Down Expand Up @@ -48,21 +49,30 @@ User.plugin(passportLocalMongoose, {
});
const Users = mongoose.model('User', UserSchema);

const passport = new Passport(Users, {
// ...
});
const passport = new Passport({}, Users);

const app = new Koa();
app.use(passport.initialize());
app.use(passport.session());
```


## Strategies

Currently supported strategies:

* Local (email)
* Apple (Sign in with Apple)
* GitHub
* Google
* OTP


## Options

See [index.js](index.js) for configuration defaults and environment flags.

You can customize the field names, see the `fields` object in [index.js](index.js).
You can customize the field names and phrases, see the `fields` and `phrases` objects in [index.js](index.js).


## Contributors
Expand Down
Loading

0 comments on commit 1888514

Please sign in to comment.