Files
archived-next-auth/example/package.json
Iain Collins 5ad0ace20e Now passes additional option to update
When calling update() after…

1. Invalidating a one time use emailToken (after use).
2. Unlinking an oAuth account.

…it now passes a third option, indicating the property that was deleted from the object (or that should have been):

e.g.

* `functions.update(user, null, { delete: 'emailToken' })`
* `functions.update(user, null, { delete: 'facebook' })`
* `functions.update(user, null, { delete: 'google' })`
* `functions.update(user, null, { delete: 'twitter' })`

This is to make it easier to integrate with databases like Mongoose.

It's needed because if you pass a Mongoose object it will *not let* the key be deleted by NextAuth, so you will have to check for this third pararam in your .update() function and use Mongoose specific commands to unset the field for the user.
2018-02-22 21:39:29 +01:00

36 lines
917 B
JSON

{
"name": "next-auth-examples",
"version": "1.8.1",
"description": "An example project for next-auth",
"repository": "https://github.com/iaincollins/next-auth.git",
"main": "",
"scripts": {
"dev": "NODE_ENV=development node index.js",
"build": "next build",
"start": "node index.js"
},
"author": "",
"license": "ISC",
"dependencies": {
"connect-mongo": "^2.0.1",
"dotenv": "^5.0.0",
"express-session": "^1.15.6",
"mongodb": "^3.0.1",
"nedb": "^1.8.0",
"next": "^5.0.0",
"next-auth": "^1.8.1",
"nodemailer": "^4.4.2",
"nodemailer-direct-transport": "^3.3.2",
"nodemailer-smtp-transport": "^2.7.4",
"passport-facebook": "^2.1.1",
"passport-google-oauth": "^1.0.0",
"passport-twitter": "^1.0.4",
"react": "^16.2.0",
"react-dom": "^16.2.0"
},
"now": {
"name": "next-auth-demo",
"alias": "next-auth-demo.now.sh"
}
}