diff --git a/plugins/oauth_client/lib/oauth_client_plugin.rb b/plugins/oauth_client/lib/oauth_client_plugin.rb
index ec44939..97ac407 100644
--- a/plugins/oauth_client/lib/oauth_client_plugin.rb
+++ b/plugins/oauth_client/lib/oauth_client_plugin.rb
@@ -30,7 +30,11 @@ class OauthClientPlugin < Noosfero::Plugin
end
def body_ending
- session.delete(:oauth_client_login) ? "" : ''
+ if session.delete(:oauth_client_login)
+ current_user.private_token_expired? if current_user.present?
+ private_token = current_user.present? ? current_user.private_token : ''
+ ""
+ end
end
def js_files
--
libgit2 0.21.2