Correction pour avoir une redirection

après la création de compte.
This commit is contained in:
Sébastien André
2021-02-23 17:37:16 +01:00
parent c1d3f00925
commit 6166551927
4 changed files with 9 additions and 3 deletions

View File

@@ -1 +0,0 @@
1totoTOTO2

View File

@@ -0,0 +1,3 @@
toto/1totoTOTO2
tata/1tataTATA2
titi/1titiTITI2

View File

@@ -55,8 +55,12 @@ export class AuthenticationService extends BaseService {
headers: this.headers
})
.pipe(
map(result => {
this.login(newUser.login, newUser.password);
map(user => {
// store user details and basic auth credentials in local storage to keep user logged in between page refreshes
user.authdata = window.btoa(newUser.login + ":" + newUser.password);
localStorage.setItem("currentUser", JSON.stringify(user));
this.currentUserSubject.next(user);
return user;
})
);
}