forked from dani-garcia/bw_web_builds
-
Notifications
You must be signed in to change notification settings - Fork 2
/
oidc_override.patch
79 lines (73 loc) · 2.78 KB
/
oidc_override.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
Subject: [PATCH] Use /sso as default login url
---
apps/web/src/app/auth/sso.component.html | 15 ---------------
libs/angular/src/auth/components/sso.component.ts | 11 +----------
libs/angular/src/auth/guards/redirect.guard.ts | 2 +-
4 files changed, 3 insertions(+), 35 deletions(-)
diff --git a/apps/web/src/app/auth/sso.component.html b/apps/web/src/app/auth/sso.component.html
index fb56cead2..38bba693c 100644
--- a/apps/web/src/app/auth/sso.component.html
+++ b/apps/web/src/app/auth/sso.component.html
@@ -15,18 +15,6 @@
</div>
<div class="card-body" *ngIf="!loggingIn">
<p>{{ "ssoLogInWithOrgIdentifier" | i18n }}</p>
- <div class="form-group">
- <label for="identifier">{{ "ssoIdentifier" | i18n }}</label>
- <input
- id="identifier"
- class="form-control"
- type="text"
- name="Identifier"
- [(ngModel)]="identifier"
- required
- appAutofocus
- />
- </div>
<hr />
<div class="d-flex">
<button
@@ -41,9 +29,6 @@
aria-hidden="true"
></i>
</button>
- <a routerLink="/login" class="btn btn-outline-secondary btn-block ml-2 mt-0">
- {{ "cancel" | i18n }}
- </a>
</div>
</div>
</div>
diff --git a/libs/angular/src/auth/components/sso.component.ts b/libs/angular/src/auth/components/sso.component.ts
index fe02304a4..5fe65a065 100644
--- a/libs/angular/src/auth/components/sso.component.ts
+++ b/libs/angular/src/auth/components/sso.component.ts
@@ -94,16 +94,7 @@ export class SsoComponent {
}
async submit(returnUri?: string, includeUserIdentifier?: boolean) {
- if (this.identifier == null || this.identifier === "") {
- this.platformUtilsService.showToast(
- "error",
- this.i18nService.t("ssoValidationFailed"),
- this.i18nService.t("ssoIdentifierRequired"),
- );
- return;
- }
-
- this.initiateSsoFormPromise = this.apiService.preValidateSso(this.identifier);
+ this.initiateSsoFormPromise = this.apiService.preValidateSso("VaultWarden");
const response = await this.initiateSsoFormPromise;
const authorizeUrl = await this.buildAuthorizeUrl(
diff --git a/libs/angular/src/auth/guards/redirect.guard.ts b/libs/angular/src/auth/guards/redirect.guard.ts
index 4853b26e7..512b3a455 100644
--- a/libs/angular/src/auth/guards/redirect.guard.ts
+++ b/libs/angular/src/auth/guards/redirect.guard.ts
@@ -15,7 +15,7 @@ export interface RedirectRoutes {
export const defaultRoutes: RedirectRoutes = {
loggedIn: "/vault",
- loggedOut: "/login",
+ loggedOut: "/sso",
locked: "/lock",
notDecrypted: "/login-initiated",
};
--
2.39.2