FIX: properly defer authentication complete
This commit is contained in:
parent
b0567f9c62
commit
b032c63773
|
@ -33,6 +33,18 @@
|
|||
</script>
|
||||
|
||||
<script>
|
||||
<%- if !current_user && flash[:authentication_data] %>
|
||||
require('discourse/routes/application').default.reopen({
|
||||
actions: {
|
||||
didTransition: function() {
|
||||
Em.run.next(function(){
|
||||
Discourse.authenticationComplete(<%=flash[:authentication_date].html_safe%>);
|
||||
});
|
||||
return this._super();
|
||||
}
|
||||
}
|
||||
});
|
||||
<%- end %>
|
||||
Discourse.CDN = '<%= Rails.configuration.action_controller.asset_host %>';
|
||||
Discourse.BaseUrl = '<%= RailsMultisite::ConnectionManagement.current_hostname %>'.replace(/:[\d]*$/,"");
|
||||
Discourse.BaseUri = '<%= Discourse::base_uri %>';
|
||||
|
@ -53,11 +65,6 @@
|
|||
<%- end %>
|
||||
Discourse.S3BaseUrl = '<%= Discourse.store.absolute_base_url %>';
|
||||
<%- end %>
|
||||
<%- if !current_user && flash[:authentication_data] %>
|
||||
Em.run.next(function(){
|
||||
Discourse.authenticationComplete(<%=flash[:authentication_data].html_safe%>);
|
||||
});
|
||||
<%- end %>
|
||||
</script>
|
||||
|
||||
<%= script 'browser-update' %>
|
||||
|
|
Loading…
Reference in New Issue