Skip to content

Commit

Permalink
change redirect URL to frontend instead of backend (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
prestonlimlianjie authored Oct 17, 2019
1 parent 69f70f7 commit 252362c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion routes/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const CLIENT_SECRET = process.env.CLIENT_SECRET
const REDIRECT_URI = process.env.REDIRECT_URI
const COOKIE_DOMAIN = process.env.COOKIE_DOMAIN
const AUTH_TOKEN_EXPIRY_MS = process.env.AUTH_TOKEN_EXPIRY_DURATION_IN_MILLISECONDS.toString()
const FRONTEND_URL = process.env.FRONTEND_URL

const jwtUtils = require('../utils/jwt-utils')

Expand Down Expand Up @@ -44,7 +45,7 @@ router.get('/', async function(req, res, next) {

res.cookie('oauthtoken', token, cookieSettings)

res.redirect(`/sites`)
res.redirect(`${FRONTEND_URL}/sites`)
} catch(err) {
console.log(err)
}
Expand Down

0 comments on commit 252362c

Please sign in to comment.