@trudb/tru-common-lib 0.0.703 → 0.0.705
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/esm2020/lib/components/login/services/tru-auth.mjs +5 -7
- package/fesm2015/trudb-tru-common-lib.mjs +4 -6
- package/fesm2015/trudb-tru-common-lib.mjs.map +1 -1
- package/fesm2020/trudb-tru-common-lib.mjs +4 -6
- package/fesm2020/trudb-tru-common-lib.mjs.map +1 -1
- package/lib/components/login/services/tru-auth.d.ts +1 -0
- package/package.json +1 -1
|
@@ -3721,13 +3721,11 @@ class TruAuth {
|
|
|
3721
3721
|
login(loginRequest) {
|
|
3722
3722
|
return this.http
|
|
3723
3723
|
.post(`${this.baseUrl}${TRU_AUTH_CONFIG.authUrl}/login`, loginRequest)
|
|
3724
|
-
.pipe(tap(switchMap(
|
|
3725
|
-
|
|
3726
|
-
.
|
|
3727
|
-
this.auth.doLoginUser(data);
|
|
3728
|
-
this.user.create(user);
|
|
3724
|
+
.pipe(tap((tokenData) => this.tokenData = tokenData), switchMap(() => this.http.post(`${this.baseUrl}${TRU_AUTH_CONFIG.authUrl}/user`, this.createUserRequest(loginRequest.username)).pipe(tap((userData) => {
|
|
3725
|
+
this.auth.doLoginUser(this.tokenData);
|
|
3726
|
+
this.user.create(userData);
|
|
3729
3727
|
this.loggedIn.next(true);
|
|
3730
|
-
}))))
|
|
3728
|
+
}))));
|
|
3731
3729
|
}
|
|
3732
3730
|
logout() {
|
|
3733
3731
|
this.doLogoutUser();
|