external login redirect, include logo images

This commit is contained in:
Evert Prants 2017-09-07 00:48:51 +03:00
parent 1d782a9b98
commit 05588560a6
Signed by: evert
GPG Key ID: 1688DA83D222D0B5
7 changed files with 8 additions and 4 deletions

View File

@ -62,10 +62,7 @@ function createSession (req, user) {
if (req.session.redirectUri) {
uri = req.session.redirectUri
delete req.session.redirectUri
}
if (req.query.redirect) {
} else if (req.query.redirect) {
uri = req.query.redirect
}

View File

@ -38,6 +38,8 @@ function setSession (req, user) {
function redirectLogin (req, res) {
let uri = '/'
console.log(req.session.redirectUri, req.session.csrf)
if (req.session.redirectUri) {
uri = req.session.redirectUri
delete req.session.redirectUri

View File

@ -20,6 +20,7 @@ router.use(oauthLimiter)
function ensureLoggedIn (req, res, next) {
if (req.session.user) return next()
req.session.redirectUri = req.originalUrl
console.log('set return uri', req.session.redirectUri, req.session.csrf)
res.redirect('/login')
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 201 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

BIN
static/image/icynet.svgz Normal file

Binary file not shown.

View File

@ -51,6 +51,8 @@ html
a.scroll(href="/#home") Home
li.fullview
a.scroll(href="/#news") News
li.fullview
a(href="https://forum.icynet.eu/") Forum
ul.fullview.floating
if user
li#user
@ -69,6 +71,8 @@ html
a.scroll(href="/#home") Home
li
a.scroll(href="/#news") News
li
a(href="https://forum.icynet.eu/") Forum
.division
if user
li#user