Skip to content

Commit

Permalink
Renaming some files
Browse files Browse the repository at this point in the history
  • Loading branch information
lfades committed Feb 14, 2020
1 parent ab67373 commit 9a42f60
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Iron from '@hapi/iron'
import { getTokenCookie } from './auth-cookies'

// Use an environment variable here instead of a hardcoded value in a production environment
// Use an environment variable here instead of a hardcoded value for production
const TOKEN_SECRET = 'this-is-a-secret-value-with-at-least-32-characters'

export function encryptSession(session) {
Expand Down
4 changes: 2 additions & 2 deletions examples/with-passport/pages/api/login.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import express from 'express'
import passport from 'passport'
import { localStrategy } from '../../lib/password-login'
import { encryptSession } from '../../lib/auth'
import { localStrategy } from '../../lib/password-local'
import { encryptSession } from '../../lib/iron'
import { setTokenCookie } from '../../lib/auth-cookies'

const app = express()
Expand Down
2 changes: 1 addition & 1 deletion examples/with-passport/pages/api/user.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getSession } from '../../lib/auth'
import { getSession } from '../../lib/iron'

export default async function user(req, res) {
const session = await getSession(req)
Expand Down
2 changes: 1 addition & 1 deletion examples/with-passport/pages/login.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const Login = () => {
body: JSON.stringify(body),
})
if (res.status === 200) {
Router.push('/profile')
Router.push('/')
} else {
throw new Error(await res.text())
}
Expand Down

0 comments on commit 9a42f60

Please sign in to comment.