LoginCancelledError confuses clients
brettle opened this issue · 1 comments
The LoginCancelledError
that is returned when a service is successfully added confuses some clients. They think the login or user creation failed when in fact it just didn't result in a new account being created. The current accounts system does not provide a way to avoid returning an error without changing the userId to the one returned by the login service.
Potential fix: monkey patch Accounts.callLoginMethod
to filter out our LoginCancelledError
s before calling the callback. The onLoginFailure
handlers would still be run on the client and server, instead of the onLogin
handlers, but it's probably better than the current situation.
Monkey patching the server instead of the client would be more fragile because it would require replacing Accounts._attemptLogin
.