login
This commit is contained in:
@@ -40,19 +40,14 @@ export class LoginComponent {
|
||||
this.http.post(environment.api_url + 'auth/login-with-session-id', {
|
||||
code: id,
|
||||
client_id: this.client_id
|
||||
}).pipe(
|
||||
this.toast.observe({
|
||||
loading: 'Logging in...',
|
||||
success: 'Logged in',
|
||||
error: 'Invalid session, please log in with your credentials'
|
||||
})
|
||||
).subscribe({
|
||||
}).subscribe({
|
||||
next: (data) => {
|
||||
if (data["code"] != null) {
|
||||
location.href = this.redirectUri + "?code=" + data["code"];
|
||||
}
|
||||
},
|
||||
error: (error) => {
|
||||
this.toast.error('Invalid session, please log in with your credentials');
|
||||
console.error(error);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user