@hivedev/hivesdk 1.0.16 → 1.0.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/hive-client.js +0 -2
- package/hive-server.cjs +2 -0
- package/hive-server.js +2 -0
- package/package.json +1 -1
package/hive-client.js
CHANGED
|
@@ -140,8 +140,6 @@ async function getHiveUrl(path) {
|
|
|
140
140
|
|
|
141
141
|
// Client/Utility/Login.js
|
|
142
142
|
async function login() {
|
|
143
|
-
window.open();
|
|
144
|
-
const parentOrigin = window.location.origin;
|
|
145
143
|
const popup = window.open(
|
|
146
144
|
await getHiveUrl(`/Client/Pages/LoginPage.html`),
|
|
147
145
|
"Hive Login",
|
package/hive-server.cjs
CHANGED
|
@@ -505,6 +505,7 @@ async function handleLogin(request, response) {
|
|
|
505
505
|
const userId = request.body.userId;
|
|
506
506
|
const password = request.body.password;
|
|
507
507
|
const deviceId = request.headers["x-device-id"];
|
|
508
|
+
console.log("Logging in...");
|
|
508
509
|
const loginRequestBody = { userId, password, serviceName };
|
|
509
510
|
const loginResponse = await fetch(
|
|
510
511
|
await getHiveUrl("/Login"),
|
|
@@ -514,6 +515,7 @@ async function handleLogin(request, response) {
|
|
|
514
515
|
body: JSON.stringify(loginRequestBody)
|
|
515
516
|
}
|
|
516
517
|
);
|
|
518
|
+
console.log(loginResponse.status);
|
|
517
519
|
if (loginResponse.status == 401) {
|
|
518
520
|
response.writeHead(401, { "Content-Type": "text/plain" });
|
|
519
521
|
response.end("Invalid Credentials!");
|
package/hive-server.js
CHANGED
|
@@ -458,6 +458,7 @@ async function handleLogin(request, response) {
|
|
|
458
458
|
const userId = request.body.userId;
|
|
459
459
|
const password = request.body.password;
|
|
460
460
|
const deviceId = request.headers["x-device-id"];
|
|
461
|
+
console.log("Logging in...");
|
|
461
462
|
const loginRequestBody = { userId, password, serviceName };
|
|
462
463
|
const loginResponse = await fetch(
|
|
463
464
|
await getHiveUrl("/Login"),
|
|
@@ -467,6 +468,7 @@ async function handleLogin(request, response) {
|
|
|
467
468
|
body: JSON.stringify(loginRequestBody)
|
|
468
469
|
}
|
|
469
470
|
);
|
|
471
|
+
console.log(loginResponse.status);
|
|
470
472
|
if (loginResponse.status == 401) {
|
|
471
473
|
response.writeHead(401, { "Content-Type": "text/plain" });
|
|
472
474
|
response.end("Invalid Credentials!");
|