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

[DX]: show error when invalid credentials #33

Open
revolunet opened this issue Jan 25, 2023 · 4 comments
Open

[DX]: show error when invalid credentials #33

revolunet opened this issue Jan 25, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@revolunet
Copy link
Member

Looks like the app crash when given invalid mainKey/userId. maybe we should show a specific error message

devtools also dont show up in that case

Capture d’écran 2023-01-25 à 11 53 21

@revolunet revolunet added the enhancement New feature or request label Jan 25, 2023
@franky47
Copy link
Contributor

Looks like this is non-base64 characters in the mainKey, which is a temporary intermediary solution to authenticate clients. It could be fixed by using a Zod parser to validate the mainKey string format before attempting to decode it.

@franky47
Copy link
Contributor

Fixed in 6099b68

@revolunet
Copy link
Member Author

(This issue also arise when signup/login from the SDK)

@franky47 franky47 reopened this Jan 26, 2023
@franky47
Copy link
Contributor

It should not, since the SDK accepts a Uint8Array for the main key, so it's up to the calling code to provide a correct key. This will be abstracted by authentication strategies.

We could however check the main key length beforehand.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants