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
Close window on auth callback error and show error to user #3143
Conversation
Because simply receiving a "Bad request" is very bad UX For example if the user cancels the auth flow, or doesn't give companion access it's better to go back
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
I have now also added some extra code to show a message to the user when authentication fails / is aborted. It should be safe with old versions of the client, because they don't check for |
I wonder why unit tests are failing on CI but not locally... |
You can merge this when you're ready :) |
Cool. Does the new string get translated before merge or will it happen after merge? As in is there anything I need to do? |
We only update English, the other locales are non-blocking for merge and mostly community contributions. You can add this for Dutch: @aduh95 could suggest French. |
Gotcha. Are we using any translation service? For my app LosslessCut I use weblate, and it works quite well. Everyone is free to contribute through weblate's web UI which has translation memory and all, and weblate will automatically read english strings from github and periodically create an aggregated PR to update the other languages when people translate. It's free for open source. |
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
|
…it#3143) * Close window on auth callback error Because simply receiving a "Bad request" is very bad UX For example if the user cancels the auth flow, or doesn't give companion access it's better to go back * Update packages/@uppy/companion/src/server/controllers/callback.js Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com> * Update packages/@uppy/companion/src/server/controllers/callback.js Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com> * Update packages/@uppy/companion/src/server/controllers/callback.js * Update callback.js * pull out reusable code to getDynamicStateFromRequest * Signal auth error to client * fix test mocking * npm run build:locale-pack * Update packages/@uppy/companion/src/server/controllers/callback.js Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com> * fix lint * add i18n string that got lost during merge * add french translation * add dutch translation * add norwegian translation Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
Because simply receiving a "Bad request" is very bad UX
For example if the user cancels the auth flow, or doesn't give companion access
it's better to go back to the uppy screen so they can try again
UPDATE: also show message in UI