[auth] call onError if user token already exists instead of return
shahidhk opened this issue · comments
Shahidh K Muhammed commented
Tanmai Gopal commented
@shahidhk Can you elaborate?
Shahidh K Muhammed commented
if (this.hasura.user.token) {
logError('A user session already exists. Use this.hasura.logout() first?');
return;
}
If someone tried to login again, even if an onError
callback is passed, it is not called. Hence this error cannot be captured from the client code.
Client can check for existing sessions before showing the login screen, but onError
callback should be able to catch these errors.
Tanmai Gopal commented
Fixed in v0.1.3