autologin
This commit is contained in:
@@ -39,12 +39,19 @@ export class LoginComponent {
|
||||
|
||||
|
||||
private handleLoginData(data: any) {
|
||||
console.log(data)
|
||||
if (data["session_key"]) {
|
||||
localStorage.setItem('auth_session_key', data.session_key)
|
||||
}
|
||||
if (data["code"] != null) {
|
||||
if (this.redirectUri) {
|
||||
location.href = this.redirectUri + "?code=" + data["code"];
|
||||
}
|
||||
} else if (data["id"] != null) {
|
||||
}
|
||||
|
||||
if (data["id"] != null) {
|
||||
this.userService.user = data as User;
|
||||
|
||||
this.navigateToDashboard();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,4 +6,5 @@ export interface User {
|
||||
createdAt: string;
|
||||
accessToken: string;
|
||||
refreshToken: string;
|
||||
code?: string;
|
||||
}
|
||||
Reference in New Issue
Block a user