skerkour / bloom-legacy

DEPRECATED - End-to-end encrypted Notes, Files, Calendar, Contacts... for Android, IOS, Linux & MacOS
https://bloom.sh
Other
120 stars 23 forks source link

Check username availability in realtime during registration #62

Open sylvain101010 opened 3 years ago

sylvain101010 commented 3 years ago

problems:

sylvain101010 commented 3 years ago

let's go!

The frontend component to modify is: https://gitlab.com/bloom42/bloom/blob/dev/webapp/src/bloom/kernel/components/SetupUsernameForm.vue

also you may have to add a backend endpoint to check if username is available (https://gitlab.com/bloom42/bloom/tree/dev/server/kernel/src/myaccount).

The endpoint should be prevent bruteforce.

Also, on the frontend side, requests should be throttled to not request the backend at each input modification, but rather ~1.5 second after no input modification.