external login redirect, include logo images
This commit is contained in:
parent
1d782a9b98
commit
05588560a6
@ -62,10 +62,7 @@ function createSession (req, user) {
|
|||||||
|
|
||||||
if (req.session.redirectUri) {
|
if (req.session.redirectUri) {
|
||||||
uri = req.session.redirectUri
|
uri = req.session.redirectUri
|
||||||
delete req.session.redirectUri
|
} else if (req.query.redirect) {
|
||||||
}
|
|
||||||
|
|
||||||
if (req.query.redirect) {
|
|
||||||
uri = req.query.redirect
|
uri = req.query.redirect
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -38,6 +38,8 @@ function setSession (req, user) {
|
|||||||
|
|
||||||
function redirectLogin (req, res) {
|
function redirectLogin (req, res) {
|
||||||
let uri = '/'
|
let uri = '/'
|
||||||
|
|
||||||
|
console.log(req.session.redirectUri, req.session.csrf)
|
||||||
if (req.session.redirectUri) {
|
if (req.session.redirectUri) {
|
||||||
uri = req.session.redirectUri
|
uri = req.session.redirectUri
|
||||||
delete req.session.redirectUri
|
delete req.session.redirectUri
|
||||||
|
@ -20,6 +20,7 @@ router.use(oauthLimiter)
|
|||||||
function ensureLoggedIn (req, res, next) {
|
function ensureLoggedIn (req, res, next) {
|
||||||
if (req.session.user) return next()
|
if (req.session.user) return next()
|
||||||
req.session.redirectUri = req.originalUrl
|
req.session.redirectUri = req.originalUrl
|
||||||
|
console.log('set return uri', req.session.redirectUri, req.session.csrf)
|
||||||
res.redirect('/login')
|
res.redirect('/login')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BIN
static/image/icynet-highres.png
Normal file
BIN
static/image/icynet-highres.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 201 KiB |
BIN
static/image/icynet-small.png
Normal file
BIN
static/image/icynet-small.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 37 KiB |
BIN
static/image/icynet.svgz
Normal file
BIN
static/image/icynet.svgz
Normal file
Binary file not shown.
@ -51,6 +51,8 @@ html
|
|||||||
a.scroll(href="/#home") Home
|
a.scroll(href="/#home") Home
|
||||||
li.fullview
|
li.fullview
|
||||||
a.scroll(href="/#news") News
|
a.scroll(href="/#news") News
|
||||||
|
li.fullview
|
||||||
|
a(href="https://forum.icynet.eu/") Forum
|
||||||
ul.fullview.floating
|
ul.fullview.floating
|
||||||
if user
|
if user
|
||||||
li#user
|
li#user
|
||||||
@ -69,6 +71,8 @@ html
|
|||||||
a.scroll(href="/#home") Home
|
a.scroll(href="/#home") Home
|
||||||
li
|
li
|
||||||
a.scroll(href="/#news") News
|
a.scroll(href="/#news") News
|
||||||
|
li
|
||||||
|
a(href="https://forum.icynet.eu/") Forum
|
||||||
.division
|
.division
|
||||||
if user
|
if user
|
||||||
li#user
|
li#user
|
||||||
|
Reference in New Issue
Block a user