Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve errors during login #332

Merged
merged 4 commits into from
Nov 15, 2024
Merged

Improve errors during login #332

merged 4 commits into from
Nov 15, 2024

Conversation

zatteo
Copy link

@zatteo zatteo commented Nov 12, 2024

No description provided.

We now determine and use cozyUrl in home.component, and also in login
component. Instead of calculating it multiple times, let's pass it
from home to login.
Also refactored a little the CozySanitizeUrlService.
@zatteo zatteo force-pushed the fix/snackbar-error-login branch from 82ae055 to c63307f Compare November 15, 2024 09:34
Comment on lines +41 to +43
if (inputUrl.includes("@")) {
throw new Error("noEmailAsCozyUrl");
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Il n'est pas possible d'avoir d'arobase dans le nom d'un Cozy ?
Sinon une regex serait plus sûr (/^[^\s@]+@[^\s@]+\.[^\s@]+$/)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

J'imagine que non. J'avoue que j'ai juste déplacé sans chercher à remettre en question ici.

@zatteo zatteo merged commit f296549 into master Nov 15, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants