mirror of
				https://github.com/NodeBB/NodeBB.git
				synced 2025-10-30 10:35:55 +01:00 
			
		
		
		
	feat: explicit handling of SSO success and failure
This commit is contained in:
		| @@ -92,7 +92,7 @@ Controllers.login = function (req, res, next) { | ||||
| 	var registrationType = meta.config.registrationType || 'normal'; | ||||
|  | ||||
| 	var allowLoginWith = (meta.config.allowLoginWith || 'username-email'); | ||||
| 	var returnTo = (req.headers['x-return-to'] || '').replace(nconf.get('base_url'), ''); | ||||
| 	var returnTo = (req.headers['x-return-to'] || '').replace(nconf.get('base_url') + nconf.get('relative_path'), ''); | ||||
|  | ||||
| 	var errorText; | ||||
| 	if (req.query.error === 'csrf-invalid') { | ||||
| @@ -214,7 +214,7 @@ Controllers.registerInterstitial = function (req, res, next) { | ||||
| 				// No interstitials, redirect to home | ||||
| 				const returnTo = req.session.returnTo || req.session.registration.returnTo; | ||||
| 				delete req.session.registration; | ||||
| 				return helpers.redirect(res, returnTo || nconf.get('relative_path') + '/'); | ||||
| 				return helpers.redirect(res, returnTo || '/'); | ||||
| 			} | ||||
| 			var renders = data.interstitials.map(function (interstitial) { | ||||
| 				return async.apply(req.app.render.bind(req.app), interstitial.template, interstitial.data || {}); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user