[auth] call onError if user token already exists instead of return
shahidhk opened this issue · comments
@shahidhk Can you elaborate?
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.
Fixed in v0.1.3