Commit Graph

2540 Commits

Author SHA1 Message Date
Iain Collins
f32ce7b7ed Release 1.8.5
* Hotifx for release 1.8.3 which was a broken release (!)
* This release includes a downgrade from webpack 4.7 to webpack 3.11 (the latest release of 3.x)
* Example upgraded to latest versions of Next.js 6.0 and React/React DOM 16.3

The downgrade of webpack is due to breaking changes in webpack. Webpack 4.7 builds do not work as universal builds (that can run in web, webworker and node.js).

There is no fix or apparent workaround for this in webpack presently, but a fix has been suggested in an issue linked to in this thread: https://github.com/webpack/webpack/issues/6525
2018-05-06 19:43:01 -04:00
Iain Collins
0b1f7b98bb Release 1.8.3
Fixes Webpack config for the latest release of webpack/webpack-cli
2018-05-06 18:28:20 -04:00
Iain Collins
64703ef4f1 Bumping version for 1.8.2 release
* Now respects 'callbackUrl' in 'strategyOptions' for oAuth providers.
* Updated dependancy versions

Resolves #25 thanks to @joshuar500
2018-05-06 18:20:03 -04:00
Iain Collins
24885187aa Merge pull request #27 from lifehome/patch-1
Respect configuration file option for setting 'secure' to false in nodemailer via an optional environment variable named EMAIL_SECURE.
2018-05-06 17:38:06 -04:00
Iain Collins
c4f81272d6 Merge pull request #29 from joshuar500/master
Respect strategyOptions.callbackUrl
2018-05-06 17:35:54 -04:00
Josh Rincon
29b03dadea Respect strategyOptions.callbackUrl 2018-04-18 19:53:39 -07:00
lifehome
3883065e1f Respect configuration file 2018-04-05 23:35:03 +08:00
Ryan Calvert
90e3eb9fb0 Add additional session configuration options 2018-03-14 10:18:41 -04:00
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
Iain Collins
bf3c5fb273 Adding support for credentials based sign in
* Resolves #18 by providing an easy way to define a custom credentials based sign in end point and use it with NextAuth.

The NextAuth client explicitly supports this option and an new example in example/pages/credentials.js shows how to use it (it’s super easy to use and and you can pass any fields you like to it).

Note that this does not explicitly allow a localStrategy to be defined but provides the same ability to define a custom auth hook - allowing custom localStrategies would probably be a footgun and likely generate support requests (as it’s more complicated to implement) so I’m inclined to keep it simple for everyone.

* Resolves #20 by passing the req to email sign in method (useful for things like language and hostname detection).

* If you do not pass a sendSignInEmail() or signIn() functions (or set them to null) then the routes for these will not be created, so that they are easy to disable.
2018-02-18 00:09:15 +01:00
Iain Collins
cc872701eb Adding LICENCE.txt
Resolves #19
2018-02-13 04:06:41 +01:00
Iain Collins
4960f19d7e Release 1.7.3 - isomorphic-fetch now a dependancy
The module `isomorphic-fetch` is required by `next-auth/client` (but should not be bundled in as the code also needs to run server side, which is why it’s listed an an external in the webpack config).

This update moves the dependancy on it from devDependancies into dependancies, which is where it should be (as is required in production as well). You would already get a warning if you didn’t have it installed, but now you you don’t need to explicitly include it.
2018-02-07 18:33:01 +00:00
Iain Collins
8045a9318a Improving documentation 2018-02-07 17:55:43 +00:00
Iain Collins
9c0f61280a Updating README 2018-02-07 17:41:25 +00:00
Iain Collins
b7c30461be Release 1.7.1 fixes bug when not passing a port
This update fixes a bug with initialisation and route handling when not passing a port to NextAuth.
2018-02-07 17:35:30 +00:00
Iain Collins
e98976af04 Changes to response API, fixes issues in 1.6
* Fixes bug in v1.6.0 with the return reponse (for those extending NextAuth), it was returning an empty response after refactoring.
* The instance of Express is now returned in ‘expressApp’, the value ‘express’ now contains Express library being referenced (making it easier to use it for things like creating static routes).
* Removed depdancy for cookie parser (resolves #15).
2018-02-07 16:57:16 +00:00
Iain Collins
ada0568c39 Fix to avoid duplicate sessions in development
Resolves #16
2018-02-07 15:05:52 +00:00
Iain Collins
398c87cf00 Release 1.5.1. - Updaing dependancies
* Example now uses Next.js 5.0.
* Pruned unused dependancies.
* Fixed missing depdendancies for example project.
* Resolved issue with missing dependancies for building the client lib.
2018-02-06 19:20:12 +00:00
Iain Collins
093b1a4524 New release: Version 1.5.0
The major change in this release is integration of next-auth client codebase, so including the next-auth-client module is no longer required.
2018-02-06 19:07:36 +00:00
Iain Collins
451e605c69 Removing the npm-shrinkwrap.json
This shouldn’t normally be published in a module and causes problems for those consuming it.
2018-02-05 04:12:48 +00:00
Iain Collins
54da7ae878 Support for SSL proxies and secure cookies
* Now trust proxies running in front when they say they are running the site over SSL (e.g. Heroku, nginx, AWS, etc).
* Now uses secure cookies on HTTPS enabled sites.
2018-02-05 03:41:40 +00:00
Iain Collins
7e77ba40f1 Merge pull request #11 from khuezy/master
Update to always use HTTPS for callback URLs and in email tokens if the site is being accessed via HTTPS.
2018-02-05 03:24:42 +00:00
khuezy
64d73f7353 simplify protocol 2018-02-04 19:08:27 -08:00
Khue Nguyen
0043df47a2 Respect the protocol 2018-02-04 17:53:59 -08:00
Khue Nguyen
dca5d4b757 added protocol check 2018-02-04 17:22:20 -08:00
Iain Collins
1450649439 Updating example package version number 2018-02-02 18:04:52 +00:00
Iain Collins
afcae75aaf Now passes oAuth profile to insert() and update()
The oAuth profile for a service is now passed to update() and insert() when signing in via oAuth (or linking accounts).

e.g. `update(user, oAuthProfile)` and `insert(user, oAuthProfile)`

This provides a way to also capture oAuth provider specific fields, such as avatar, location, organisation, etc. as needed.

Thanks to @gielcobben for raising this.
2018-02-02 18:04:13 +00:00
Iain Collins
5fe3f09d47 Adding additional objects to NextAuth response
This makes it easier to access properties after loading NexAuth.
2018-01-30 06:46:33 +00:00
Iain Collins
ff23eba4a4 Updating email config example
Now sends mail directly from localhost if no mail server configured.

This is not recommended for production but can be useful for testing.
2018-01-30 06:25:37 +00:00
Iain Collins
e6c5b06285 MInor typo corrections 2018-01-29 03:08:36 +00:00
Iain Collins
5d28116acc Adding documentation for the example site 2018-01-28 11:05:16 +00:00
Iain Collins
9cad8e7ab8 Improving documentation 2018-01-28 09:01:55 +00:00
Iain Collins
85f5b262c1 Improved documentation and examples 2018-01-28 08:32:19 +00:00
Iain Collins
c2480fde85 Fixing bug with displaying linked accounts
Linked account information was sometimes displayed incorrectly.

This has been fixed, and error handling tightened up to reduce errors.
2018-01-27 15:08:32 +00:00
Iain Collins
b905c856e4 Adding body-parser to package.json 2018-01-27 14:42:24 +00:00
Iain Collins
021a16ea10 Improving documentation 2018-01-27 13:09:19 +00:00
Iain Collins
803736ad0c Adding documentation 2018-01-27 13:01:02 +00:00
Iain Collins
57df0378f1 Removing build dir
Commited by accident
2018-01-27 12:41:28 +00:00
Iain Collins
a37fc97a60 Initial commit of next-auth and example 2018-01-27 12:37:30 +00:00
Iain Collins
cc0e2d9366 Initial commit 2018-01-27 12:28:16 +00:00