The resetBySession method wraps the Reset by Session Password API endpoint. The Member must have an active Member Session for this method to be called.
If this method succeeds, the password factor will be added to the existing Member Session and the session cookies will be minted and stored in the browser.
You can listen for successful login events anywhere in the codebase with the stytch.session.onChange() method or useStytchMemberSession hook if you are using React.