Correction pour avoir une redirection
après la création de compte.
This commit is contained in:
Binary file not shown.
@@ -1 +0,0 @@
|
|||||||
1totoTOTO2
|
|
||||||
3
Back/skydiveLogs-api/users.txt
Normal file
3
Back/skydiveLogs-api/users.txt
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
toto/1totoTOTO2
|
||||||
|
tata/1tataTATA2
|
||||||
|
titi/1titiTITI2
|
||||||
@@ -55,8 +55,12 @@ export class AuthenticationService extends BaseService {
|
|||||||
headers: this.headers
|
headers: this.headers
|
||||||
})
|
})
|
||||||
.pipe(
|
.pipe(
|
||||||
map(result => {
|
map(user => {
|
||||||
this.login(newUser.login, newUser.password);
|
// 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;
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user