recover from bad CSRF tokens without requiring a hard refresh of the browser

This commit is contained in:
Sam
2013-08-27 15:56:12 +10:00
parent bec463564f
commit c4a0152dc6
5 changed files with 16 additions and 9 deletions

View File

@ -83,6 +83,8 @@ class Users::OmniauthCallbacksController < ApplicationController
# log on any account that is active with forum access
if Guardian.new(user).can_access_forum? && user.active
log_on_user(user)
# don't carry around old auth info, perhaps move elsewhere
session[:authentication] = nil
@data.authenticated = true
else
if SiteSetting.invite_only?