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:
parent
573e6b65ba
commit
ccfc621d51
7 changed files with 29 additions and 2 deletions
|
@ -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();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue