FIX: Flash authentication data not rendered in latest iOS safari browser
This commit is contained in:
parent
f8305f53c7
commit
92bf3c667e
|
@ -454,7 +454,7 @@ class ApplicationController < ActionController::Base
|
|||
end
|
||||
|
||||
def can_cache_content?
|
||||
current_user.blank? && flash[:authentication_data].blank?
|
||||
current_user.blank? && cookies[:authentication_data].blank?
|
||||
end
|
||||
|
||||
# Our custom cache method
|
||||
|
|
|
@ -67,7 +67,7 @@ class Users::OmniauthCallbacksController < ApplicationController
|
|||
if (provider && provider.full_screen_login) || cookies['fsl']
|
||||
cookies.delete('fsl')
|
||||
cookies['_bypass_cache'] = true
|
||||
flash[:authentication_data] = @auth_result.to_client_hash.to_json
|
||||
cookies[:authentication_data] = @auth_result.to_client_hash.to_json
|
||||
redirect_to @origin
|
||||
else
|
||||
respond_to do |format|
|
||||
|
|
|
@ -56,8 +56,8 @@
|
|||
|
||||
<%= tag.meta id: 'data-discourse-setup', data: client_side_setup_data %>
|
||||
|
||||
<%- if !current_user && flash[:authentication_data] %>
|
||||
<meta id="data-authentication" data-authentication-data="<%= flash[:authentication_data] %>">
|
||||
<%- if !current_user && cookies[:authentication_data] %>
|
||||
<meta id="data-authentication" data-authentication-data="<%= cookies.delete(:authentication_data) %>">
|
||||
<%= preload_script "authentication-complete" %>
|
||||
<%- end %>
|
||||
</head>
|
||||
|
|
Loading…
Reference in New Issue