Commit 7f6d5416303e58ebb5270c3d94b3c3e7efeac714

Authored by Victor Costa
1 parent e38debed

Fix return of private_token after login

Showing 3 changed files with 4 additions and 7 deletions   Show diff stats
index.html
... ... @@ -95,7 +95,6 @@
95 95 <a href="/plugin/oauth_client/google_oauth2?oauth_client_popup=true&id=2" target="_blank" class="google">Google</a>
96 96 <a href="/plugin/oauth_client/facebook?oauth_client_popup=true&id=1" target="_blank" class="facebook">Facebook</a>
97 97 <a href="/plugin/oauth_client/noosfero_oauth2?oauth_client_popup=true&id=3" target="_blank" class="participa">Participa</a>
98   - <input type="text" id="private-token" style="display: none">
99 98 </div>
100 99  
101 100 <script src='js/main.js'></script>
... ...
js/login.js
... ... @@ -1,6 +0,0 @@
1   -var privateToken;
2   -
3   -function oauthPluginHandleLoginResult(loggedIn, token) {
4   - privateToken = token;
5   - jQuery('#login #private-token').val(privateToken); //FIXME remove
6   -}
js/main.js
... ... @@ -111,3 +111,7 @@ function loadRandomProposal(topic_id, private_token) {
111 111 });
112 112 });
113 113 }
  114 +
  115 +function oauthPluginHandleLoginResult(loggedIn, token) {
  116 + private_token = token;
  117 +}
... ...