diff --git a/src/js/client.js b/src/js/client.js index 06b4a046a..84e1d4dbf 100644 --- a/src/js/client.js +++ b/src/js/client.js @@ -1763,24 +1763,6 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout window.location.href = client.apiOrigin + '/api/v1/cloudron/logout?access_token=' + token; }; - // this is ununsed because webadmin uses implicit grant flow - Client.prototype.exchangeCodeForToken = function (code, callback) { - var data = { - grant_type: 'authorization_code', - code: code, - redirect_uri: window.location.protocol + '//' + window.location.host, - client_id: this._clientId, - client_secret: this._clientSecret - }; - - post('/api/v1/oauth/token?response_type=token&client_id=' + this._clientId, data, null, function (error, data, status) { - if (error) return callback(error); - if (status !== 200) return callback(new ClientError(status, data)); - - callback(null, data.access_token); - }); - }; - Client.prototype.uploadFile = function (appId, file, progressCallback, callback) { var fd = new FormData(); fd.append('file', file);