mirror of
https://github.com/portainer/portainer.git
synced 2025-07-27 01:09:41 +02:00
fix(oauth): fix an UX issue when updating microsoft oauth settings
This commit is contained in:
parent
73f20b5157
commit
e325ad10dd
2 changed files with 11 additions and 2 deletions
|
@ -37,6 +37,14 @@ angular.module('portainer.extensions.oauth')
|
|||
if (ctrl.settings.RedirectURI === '') {
|
||||
ctrl.settings.RedirectURI = window.location.origin;
|
||||
}
|
||||
ctrl.state.provider.authUrl = ctrl.settings.AuthorizationURI;
|
||||
if (ctrl.settings.AuthorizationURI !== '') {
|
||||
ctrl.state.provider.authUrl = ctrl.settings.AuthorizationURI;
|
||||
|
||||
if (ctrl.settings.AuthorizationURI.indexOf('login.microsoftonline.com') > -1) {
|
||||
var tenantID = ctrl.settings.AuthorizationURI.match(/login.microsoftonline.com\/(.*?)\//)[1];
|
||||
ctrl.state.microsoftTenantID = tenantID;
|
||||
onMicrosoftTenantIDChange();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue