@arv-bedrock/auth-sso 0.2.7 → 0.2.8
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/dist/cjs/auth.js +4 -4
- package/dist/esm/auth.js +4 -4
- package/package.json +1 -1
package/dist/cjs/auth.js
CHANGED
|
@@ -63,7 +63,7 @@ class Auth {
|
|
|
63
63
|
if (this.isCitizen()) {
|
|
64
64
|
target = `${this.authHost}/auth/${constant_1.CITIZEN}/login?redirectUri=${callbackURL}&client_id=${this.clientId}`;
|
|
65
65
|
}
|
|
66
|
-
window.location.
|
|
66
|
+
window.location.assign(target);
|
|
67
67
|
}
|
|
68
68
|
doRegister(redirectUrl = this.defaultCallback) {
|
|
69
69
|
let url = new URL(redirectUrl, window.location.origin).toString();
|
|
@@ -75,7 +75,7 @@ class Auth {
|
|
|
75
75
|
if (this.isCitizen()) {
|
|
76
76
|
location = `${this.authHost}/auth/${constant_1.CITIZEN}/main-register?redirectUri=${callbackURL}&client_id=${this.clientId}`;
|
|
77
77
|
}
|
|
78
|
-
window.location.
|
|
78
|
+
window.location.assign(location);
|
|
79
79
|
}
|
|
80
80
|
createQueryParam(data) {
|
|
81
81
|
const searchParams = new URLSearchParams();
|
|
@@ -120,7 +120,7 @@ class Auth {
|
|
|
120
120
|
return __awaiter(this, void 0, void 0, function* () {
|
|
121
121
|
try {
|
|
122
122
|
const result = yield (0, _fetch_1.default)(`${this.authHost}/api/v1/oauth/loginMethodRequest?${this.queryString}`);
|
|
123
|
-
window.location.
|
|
123
|
+
window.location.assign(result.data.redirectUri);
|
|
124
124
|
}
|
|
125
125
|
catch (err) {
|
|
126
126
|
console.log(err);
|
|
@@ -168,7 +168,7 @@ class Auth {
|
|
|
168
168
|
if (this.clientInit.isPortal) {
|
|
169
169
|
return this.doLogout();
|
|
170
170
|
}
|
|
171
|
-
window.location.
|
|
171
|
+
window.location.assign(`${this.clientInit.portalHomeUrl}?client_id=${this.clientId}&user_type=${this.userType}`);
|
|
172
172
|
}
|
|
173
173
|
verifyToken() {
|
|
174
174
|
return (0, _fetch_1.default)(`${this.authHost}/api/v1/oauth/verifyToken?${this.queryString}`, {
|
package/dist/esm/auth.js
CHANGED
|
@@ -47,7 +47,7 @@ class Auth {
|
|
|
47
47
|
if (this.isCitizen()) {
|
|
48
48
|
target = `${this.authHost}/auth/${CITIZEN}/login?redirectUri=${callbackURL}&client_id=${this.clientId}`;
|
|
49
49
|
}
|
|
50
|
-
window.location.
|
|
50
|
+
window.location.assign(target);
|
|
51
51
|
}
|
|
52
52
|
doLogout = async () => {
|
|
53
53
|
try {
|
|
@@ -68,7 +68,7 @@ class Auth {
|
|
|
68
68
|
if (this.isCitizen()) {
|
|
69
69
|
location = `${this.authHost}/auth/${CITIZEN}/main-register?redirectUri=${callbackURL}&client_id=${this.clientId}`;
|
|
70
70
|
}
|
|
71
|
-
window.location.
|
|
71
|
+
window.location.assign(location);
|
|
72
72
|
}
|
|
73
73
|
createQueryParam(data) {
|
|
74
74
|
const searchParams = new URLSearchParams();
|
|
@@ -108,7 +108,7 @@ class Auth {
|
|
|
108
108
|
async doLoginMethodReqeust() {
|
|
109
109
|
try {
|
|
110
110
|
const result = await customFetch(`${this.authHost}/api/v1/oauth/loginMethodRequest?${this.queryString}`);
|
|
111
|
-
window.location.
|
|
111
|
+
window.location.assign(result.data.redirectUri);
|
|
112
112
|
}
|
|
113
113
|
catch (err) {
|
|
114
114
|
console.log(err);
|
|
@@ -147,7 +147,7 @@ class Auth {
|
|
|
147
147
|
if (this.clientInit.isPortal) {
|
|
148
148
|
return this.doLogout();
|
|
149
149
|
}
|
|
150
|
-
window.location.
|
|
150
|
+
window.location.assign(`${this.clientInit.portalHomeUrl}?client_id=${this.clientId}&user_type=${this.userType}`);
|
|
151
151
|
}
|
|
152
152
|
verifyToken() {
|
|
153
153
|
return customFetch(`${this.authHost}/api/v1/oauth/verifyToken?${this.queryString}`, {
|