-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Explicite les messages d'erreur liés à l'authentification
- Loading branch information
Showing
2 changed files
with
39 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -110,8 +110,20 @@ export const useLoginState = ({ | |
setIsLoading(false); | ||
|
||
// sort si il y a une erreur | ||
if (error || !data.session) { | ||
setError('La vérification du compte a échouée'); | ||
if (error) { | ||
setError( | ||
'Impossible de se connecter. Veuillez refaire la manipulation "connexion sans mot de passe". Attention le lien envoyé par email n\'est valide qu\'une heure. Si le problème persiste, contactez le support.' + | ||
'(' + | ||
error.name + | ||
error.code + | ||
error.message + | ||
')' | ||
); | ||
return; | ||
} | ||
|
||
if (!data.session) { | ||
setError('Impossible de se connecter. Veuillez contacter le support.'); | ||
return; | ||
} | ||
|
||
|
@@ -141,7 +153,15 @@ export const useLoginState = ({ | |
|
||
// sort si il y a une erreur | ||
if (error || !data.session) { | ||
setError('La vérification du compte a échouée'); | ||
if (error?.code === '') | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
farnoux
Author
Contributor
|
||
setError( | ||
'Le changement de mot de passe a échoué. Veuillez refaire la manipulation "mot de passe oublié". Attention le lien envoyé par email n\'est valide qu\'une heure. Si le problème persiste, contactez le support.' + | ||
'(' + | ||
error.name + | ||
error.code + | ||
error.message + | ||
')' | ||
); | ||
return; | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@farnoux pourquoi ce test ? Est-ce que le message ne devrait pas être affiché quand
code
est autre chose qu'une chaîne vide ?