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

Feat/login url handling and errors #52

Merged
merged 3 commits into from
Dec 2, 2021

Conversation

Ldoppea
Copy link
Member

@Ldoppea Ldoppea commented Nov 22, 2021

This PR:

  • Add CozyURL sanitization (remove slug, ensure scheme, remove trailing slashes etc)
  • Fix HTTP error messages handling
    • cozy-slack error format differs from Bitwarden's one so we need to add a custom parser
    • ⚠️ current implementation is pretty simple and may need to be improved it in the future if more complex messages can be received from stack
  • Add a custom popup in case of 401 message from stack during login phase
    • ❓ Can we suppose a 401 error must be an invalid login/password from the user? Or should we specify a more generic message?

@delete-merged-branch delete-merged-branch bot deleted the branch master November 26, 2021 12:18
@Ldoppea Ldoppea force-pushed the feat/login_url_handling_and_errors branch 2 times, most recently from f06e432 to 60520fc Compare November 29, 2021 16:44
@Ldoppea Ldoppea changed the base branch from fix/import_vault to master November 30, 2021 14:34
Copy link
Contributor

@Crash-- Crash-- left a comment

Choose a reason for hiding this comment

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

except translation strings, 👍

Sanitize Cozy url before login

Display a user friendly exception in case of badly formated Cozy url
CozyStack error messages do not fit Bitwarden's errors format so we
have to create a custom parser for them
As the stack does not translate error messages and 401 is the most
common error then we intercept this specific error to translate it on
client side
@Ldoppea Ldoppea force-pushed the feat/login_url_handling_and_errors branch from 60520fc to 9ffea65 Compare November 30, 2021 16:25
@Ldoppea Ldoppea merged commit 81dbc33 into master Dec 2, 2021
@delete-merged-branch delete-merged-branch bot deleted the feat/login_url_handling_and_errors branch December 2, 2021 16:27
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.

3 participants