Skip to content

Commit

Permalink
rough workaround for SolidLabResearch#55
Browse files Browse the repository at this point in the history
  • Loading branch information
mvanbrab committed Jul 11, 2023
1 parent 9104eca commit 2c01662
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions src/authentication/authenticate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,19 +82,20 @@ export default async function authenticate(options: ILoginOptions): Promise<{ fe

async function queryUserAuthentication() {
// Ask the user if they want to authenticate. If not, use cross-fetch, else give them a prompt to provide an idp
console.log(`Do you want to authenticate the current request? [Y, n] `);
let userWantsToAuthenticate : boolean = await new Promise((resolve, reject) => {
process.stdin.setRawMode(true);
process.stdin.resume();
process.stdin.on('data', (chk) => {
if (chk.toString('utf8') === "n") {
resolve(false);
} else {
resolve(true);
}
});
});
return userWantsToAuthenticate
// console.log(`Do you want to authenticate the current request? [Y, n] `);
// let userWantsToAuthenticate : boolean = await new Promise((resolve, reject) => {
// process.stdin.setRawMode(true);
// process.stdin.resume();
// process.stdin.on('data', (chk) => {
// if (chk.toString('utf8') === "n") {
// resolve(false);
// } else {
// resolve(true);
// }
// });
// });
// return userWantsToAuthenticate
return false
}


Expand Down

0 comments on commit 2c01662

Please sign in to comment.