Prevent attempting to authenticate more than four times per hour

This only affects scripts - running this nxapi command in a terminal and the Electron app will ignore this limit.

https://github.com/samuelthomas2774/nxapi/issues/9
This commit is contained in:
Samuel Elliott
2022-07-27 15:48:19 +01:00
parent d3e5a88625
commit e12bb364a7
32 changed files with 109 additions and 48 deletions

View File

@@ -7,7 +7,7 @@ import type { Arguments as ParentArguments } from '../util.js';
import { DiscordPresenceContext, DiscordPresencePlayTime, getDiscordPresence, getInactiveDiscordPresence } from '../../discord/util.js';
import { ArgumentsCamelCase, Argv, YargsArguments } from '../../util/yargs.js';
import { initStorage } from '../../util/storage.js';
import { getToken } from '../../common/auth/nso.js';
import { getToken } from '../../common/auth/coral.js';
import { timeoutSignal } from '../../util/misc.js';
import { getUserAgent } from '../../util/useragent.js';