fixed onAuth event handler sync issue