From ea651dd5930d709fb74b8a105acf826d1c78fa42 Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Fri, 20 Mar 2020 01:16:28 +0100 Subject: [PATCH] Using OTAC on register --- src/app/login/login.component.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/app/login/login.component.ts b/src/app/login/login.component.ts index c608245c..e1c3daa3 100644 --- a/src/app/login/login.component.ts +++ b/src/app/login/login.component.ts @@ -42,7 +42,14 @@ export class LoginComponent useOTAC(otac: string) { - console.log("Got an OTAC: " + otac); + this.http.post("/api/account/otac-login", {"otac": otac}).pipe(catchError((error => + { + this.registerErrors = error.error; + return EMPTY; + }))).subscribe(() => + { + window.location.href = this.redirectURI; + }); } async register()