1
0
mirror of https://github.com/pocket-id/pocket-id.git synced 2026-03-23 18:50:07 +00:00

feat: disable/enable users (#437)

Co-authored-by: Elias Schneider <login@eliasschneider.com>
This commit is contained in:
Kyle Mendell
2025-04-18 10:38:50 -05:00
committed by GitHub
parent 56a8b5d0c0
commit c843a60131
24 changed files with 245 additions and 56 deletions

View File

@@ -14,7 +14,10 @@ export function getAxiosErrorMessage(
return message;
}
export function axiosErrorToast(e: unknown, defaultMessage: string = m.an_unknown_error_occurred()) {
export function axiosErrorToast(
e: unknown,
defaultMessage: string = m.an_unknown_error_occurred()
) {
const message = getAxiosErrorMessage(e, defaultMessage);
toast.error(message);
}
@@ -29,7 +32,8 @@ export function getWebauthnErrorMessage(e: unknown) {
m.authenticator_does_not_support_resident_keys(),
ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED: m.passkey_was_previously_registered(),
ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG:
m.authenticator_does_not_support_any_of_the_requested_algorithms()
m.authenticator_does_not_support_any_of_the_requested_algorithms(),
ERROR_USER_DISABLED_MSG: m.user_disabled()
};
let message = m.an_unknown_error_occurred();