1
0
Fork 0
mirror of https://github.com/plankanban/planka.git synced 2025-07-19 13:19:44 +02:00

feat: Ability to show detailed auth errors, set to false by default (#860)

This commit is contained in:
Aurélien Troncy 2024-08-30 11:47:29 +02:00 committed by GitHub
parent 573e6b65ba
commit ccfc621d51
7 changed files with 29 additions and 2 deletions

View file

@ -18,6 +18,11 @@ const createMessage = (error) => {
}
switch (error.message) {
case 'Invalid credentials':
return {
type: 'error',
content: 'common.invalidCredentials',
};
case 'Invalid email or username':
return {
type: 'error',
@ -116,6 +121,7 @@ const Login = React.memo(
useEffect(() => {
if (wasSubmitting && !isSubmitting && error) {
switch (error.message) {
case 'Invalid credentials':
case 'Invalid email or username':
emailOrUsernameField.current.select();