@c8y/login 1022.21.3 → 1022.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,19 +1,19 @@
1
1
  {
2
2
  "name": "@c8y/login",
3
- "version": "1022.21.3",
3
+ "version": "1022.27.0",
4
4
  "description": "This package is used to scaffold a login application for Cumulocity IoT.",
5
5
  "dependencies": {
6
- "@c8y/style": "1022.21.3",
7
- "@c8y/ngx-components": "1022.21.3",
8
- "@c8y/client": "1022.21.3",
9
- "@c8y/bootstrap": "1022.21.3",
6
+ "@c8y/style": "1022.27.0",
7
+ "@c8y/ngx-components": "1022.27.0",
8
+ "@c8y/client": "1022.27.0",
9
+ "@c8y/bootstrap": "1022.27.0",
10
10
  "@angular/cdk": "^19.2.18",
11
11
  "ngx-bootstrap": "19.0.2",
12
12
  "rxjs": "7.8.1"
13
13
  },
14
14
  "devDependencies": {
15
- "@c8y/options": "1022.21.3",
16
- "@c8y/devkit": "1022.21.3"
15
+ "@c8y/options": "1022.27.0",
16
+ "@c8y/devkit": "1022.27.0"
17
17
  },
18
18
  "peerDependencies": {
19
19
  "@angular/common": ">=19 <20"
@@ -32,6 +32,15 @@ c8y-bootstrap, c8y-login, c8y-cookie-banner {
32
32
  }
33
33
  }
34
34
 
35
+ .c8y-system-theme {
36
+ @media (prefers-color-scheme: dark){
37
+ .square{
38
+ background-color: var(--c8y-palette-gray-100);
39
+ color: var(--c8y-palette-gray-20);
40
+ }
41
+ }
42
+ }
43
+
35
44
  .password-strength {
36
45
  width: 180px;
37
46
  margin-bottom: 20px;
@@ -130,6 +139,15 @@ c8y-bootstrap, c8y-login, c8y-cookie-banner {
130
139
  }
131
140
  }
132
141
 
142
+ .c8y-system-theme {
143
+ @media (prefers-color-scheme: dark){
144
+ .mainlogo.c8y-logo{
145
+ filter: grayscale(1) contrast(0.5) brightness(1.4);
146
+ }
147
+ }
148
+ }
149
+
150
+
133
151
  .mainlogo[src] {
134
152
  background: none;
135
153
  padding-bottom: 0;
@@ -52,6 +52,7 @@ export class LoginService extends SimplifiedAuthService {
52
52
  'error_description'
53
53
  ] as const;
54
54
 
55
+ private readonly IDP_HINT_QUERY_PARAM = 'idp_hint';
55
56
  private translateService = inject(TranslateService);
56
57
  ERROR_MESSAGES = {
57
58
  minlength: gettext('Password must have at least 8 characters and no more than 32.'),
@@ -125,6 +126,7 @@ export class LoginService extends SimplifiedAuthService {
125
126
  }
126
127
 
127
128
  redirectToOauth() {
129
+ const idpHint = this.getIdpHintFromQueryParams();
128
130
  const { initRequest, flowControlledByUI } = this.oauthOptions;
129
131
  const fullPath = `${window.location.origin}${window.location.pathname}`;
130
132
  const redirectUrl = encodeURIComponent(fullPath);
@@ -138,6 +140,8 @@ export class LoginService extends SimplifiedAuthService {
138
140
  .then(res => res.json())
139
141
  .then((res: any) => (window.location.href = res.redirectTo))
140
142
  .catch(ex => this.showSsoError(ex));
143
+ } else if (idpHint) {
144
+ window.location.href = `${initRequest}${originUriParam}&${this.IDP_HINT_QUERY_PARAM}=${idpHint}`;
141
145
  } else {
142
146
  window.location.href = `${initRequest}${originUriParam}`;
143
147
  }
@@ -648,4 +652,9 @@ export class LoginService extends SimplifiedAuthService {
648
652
  }
649
653
  return response;
650
654
  }
655
+
656
+ private getIdpHintFromQueryParams(): string | null {
657
+ const params = new URLSearchParams(window.location.search);
658
+ return params.get(this.IDP_HINT_QUERY_PARAM) || null;
659
+ }
651
660
  }