I want to make cli tools just like firebase or github using yargs. so firebase does have this command "firebase login". I wonder how and where do they store the token/credential. If it's web browser I could store it in the cookie or local storage but using cli I don't have any clue.
yargs(Deno.args)
.command('login', 'make a post request to my oauth server', (yargs: any) => {
OauthClient.post({ username: yargs.username, password: yargs.password })
.then(r => {
// what to do with this token????
const token = extractToken(r.headers.authorization)
})
})
.strictCommands()
.demandCommand(1)
.parse()