oidc dashboard login
This commit is contained in:
@@ -2713,15 +2713,22 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout
|
||||
Client.prototype.login = function () {
|
||||
this.setToken(null);
|
||||
|
||||
window.location.href = '/login.html?returnTo=/' + encodeURIComponent(window.location.hash);
|
||||
// start oidc flow
|
||||
window.location.href = '/openid/auth?client_id=dashboard&scope=openid email profile&response_type=code token&redirect_uri=' + window.location.origin + '/authcallback.html';
|
||||
// window.location.href = '/login.html?returnTo=/' + encodeURIComponent(window.location.hash);
|
||||
};
|
||||
|
||||
Client.prototype.logout = function () {
|
||||
var token = this.getToken();
|
||||
this.setToken(null);
|
||||
var that = this;
|
||||
|
||||
// invalidates the token
|
||||
window.location.href = client.apiOrigin + '/api/v1/cloudron/logout?access_token=' + token;
|
||||
// destroy oidc session in the spirit of true SSO
|
||||
del('/api/v1/oidc/sessions', null, function (error, data, status) {
|
||||
if (error) console.error('Failed to logout from oidc session');
|
||||
|
||||
that.setToken(null);
|
||||
|
||||
window.location.href = '/';
|
||||
});
|
||||
};
|
||||
|
||||
Client.prototype.getAppEventLog = function (appId, page, perPage, callback) {
|
||||
|
||||
Reference in New Issue
Block a user