End script if login fails
parent
96074fbeb9
commit
40d13f25de
|
@ -65,6 +65,12 @@ async function main() {
|
||||||
);
|
);
|
||||||
console.log(`Authentication result: ${result.message}\n`);
|
console.log(`Authentication result: ${result.message}\n`);
|
||||||
|
|
||||||
|
// Manage failed login
|
||||||
|
if (!result.success) {
|
||||||
|
console.log("Failed authentication, impossible to continue");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Get user data
|
// Get user data
|
||||||
console.log("Fetching user data...");
|
console.log("Fetching user data...");
|
||||||
const userdata = await getUserData();
|
const userdata = await getUserData();
|
||||||
|
|
Loading…
Reference in New Issue