Compare commits

..

1 Commits

Author SHA1 Message Date
422ab527f8 content-type??? 2021-12-01 22:10:47 +01:00

View File

@ -90,6 +90,7 @@ export class AuthenticateController extends BaseController {
const resCheckTokenAuth = await openIDClient.checkTokenAuth(authTokenData.accessToken); const resCheckTokenAuth = await openIDClient.checkTokenAuth(authTokenData.accessToken);
res.writeStatus("200"); res.writeStatus("200");
this.addCorsHeaders(res); this.addCorsHeaders(res);
res.writeHeader("Content-type", "application/json");
return res.end(JSON.stringify({ ...resCheckTokenAuth, ...resUserData, authToken: token })); return res.end(JSON.stringify({ ...resCheckTokenAuth, ...resUserData, authToken: token }));
} catch (err) { } catch (err) {
console.info("User was not connected", err); console.info("User was not connected", err);
@ -120,6 +121,7 @@ export class AuthenticateController extends BaseController {
res.writeStatus("200"); res.writeStatus("200");
this.addCorsHeaders(res); this.addCorsHeaders(res);
res.writeHeader("Content-type", "application/json");
return res.end(JSON.stringify({ ...data, authToken })); return res.end(JSON.stringify({ ...data, authToken }));
} catch (e) { } catch (e) {
console.error("openIDCallback => ERROR", e); console.error("openIDCallback => ERROR", e);