Skip to content

Commit

Permalink
Update auth config defaults; fix typo
Browse files Browse the repository at this point in the history
Option `sessionResave` is now `true` by default in NextAuth as of 1.12.1.
  • Loading branch information
iaincollins committed Dec 4, 2018
1 parent 6531c65 commit 7eac17d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions next-auth.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ module.exports = () => {
// The expiry time for a session is reset every time a user revisits
// the site or revalidates their session token. This is the maximum
// idle time value.
sessionMaxAge: 60000 * 60 * 24 * 1,
sessionMaxAge: 60000 * 60 * 24 * 7,
// Session Revalidation in X ms (optional, default is 60 seconds).
// Specifies how often a Single Page App should revalidate a session.
// Does not impact the session life on the server, but causes clients
Expand All @@ -64,7 +64,6 @@ module.exports = () => {
// state correctly.
// If set to 0 will revalidate a session before rendering every page.
sessionRevalidateAge: 60000,
sessionResave: true,
// Canonical URL of the server (optiona, but recommended).
// e.g. 'http://localhost:3000' or 'https://www.example.com'
// Used in callbak URLs and email sign in links. It will be auto
Expand Down
2 changes: 1 addition & 1 deletion pages/examples/authentication.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ export default class extends React.Component {
from Express Session by parsing the <span className="font-weight-bold">req</span> object.
</p>
<p>
If a user is signed in <span className="font-weight-bold">this.session.user</span> will contain
If a user is signed in <span className="font-weight-bold">this.props.session.user</span> will contain
a user object. If they are not logged in, it will not be set.
</p>
<p>
Expand Down

0 comments on commit 7eac17d

Please sign in to comment.