12 lines
371 B
TypeScript
12 lines
371 B
TypeScript
export type GateState = 'pending' | 'authenticated' | 'locked' | 'error' | 'rate-limited';
|
|
|
|
export const resolveStatusCheckFailureState = (options: {
|
|
shouldUseDesktopShellPasswordLogin?: boolean;
|
|
}): Exclude<GateState, 'pending' | 'authenticated' | 'rate-limited'> => {
|
|
if (options.shouldUseDesktopShellPasswordLogin) {
|
|
return 'locked';
|
|
}
|
|
|
|
return 'error';
|
|
};
|