-
Quickly log in using your organization's single sign-on portal. Please enter your organization's
- identifier to begin.
+
{{'ssoLogInWithOrgIdentifier' | i18n}}
-
+
+ [(ngModel)]="identifier" required appAutofocus>
diff --git a/src/app/accounts/sso.component.ts b/src/app/accounts/sso.component.ts
index f906d4f95e3..0c80ac5fa1c 100644
--- a/src/app/accounts/sso.component.ts
+++ b/src/app/accounts/sso.component.ts
@@ -15,6 +15,8 @@ import { StorageService } from 'jslib/abstractions/storage.service';
import { SsoComponent as BaseSsoComponent } from 'jslib/angular/components/sso.component';
+const IdentifierStorageKey = 'ssoOrgIdentifier';
+
@Component({
selector: 'app-sso',
templateUrl: 'sso.component.html',
@@ -31,4 +33,26 @@ export class SsoComponent extends BaseSsoComponent {
this.redirectUri = window.location.origin + '/sso-connector.html';
this.clientId = 'web';
}
+
+ async ngOnInit() {
+ super.ngOnInit();
+ const queryParamsSub = this.route.queryParams.subscribe(async (qParams) => {
+ if (qParams.identifier != null) {
+ this.identifier = qParams.identifier;
+ } else {
+ const storedIdentifier = await this.storageService.get(IdentifierStorageKey);
+ if (storedIdentifier != null) {
+ this.identifier = storedIdentifier;
+ }
+ }
+ if (queryParamsSub != null) {
+ queryParamsSub.unsubscribe();
+ }
+ });
+ }
+
+ async submit() {
+ await this.storageService.save(IdentifierStorageKey, this.identifier);
+ super.submit();
+ }
}
diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts
index 49fe65edd7e..e005295f920 100644
--- a/src/app/app-routing.module.ts
+++ b/src/app/app-routing.module.ts
@@ -104,7 +104,7 @@ const routes: Routes = [
{
path: 'sso', component: SsoComponent,
canActivate: [UnauthGuardService],
- data: { titleId: 'createAccount' }, // TODO
+ data: { titleId: 'enterpriseSingleSignOn' },
},
{
path: 'set-password', component: SetPasswordComponent,
diff --git a/src/app/layouts/organization-layout.component.html b/src/app/layouts/organization-layout.component.html
index 6280f875d9e..8a2cc372a99 100644
--- a/src/app/layouts/organization-layout.component.html
+++ b/src/app/layouts/organization-layout.component.html
@@ -48,7 +48,7 @@
- Enterprise →
+ {{'businessPortal' | i18n}} →
diff --git a/src/connectors/sso.html b/src/connectors/sso.html
index 6fd51a2b931..b82716764e1 100644
--- a/src/connectors/sso.html
+++ b/src/connectors/sso.html
@@ -6,7 +6,7 @@