Why does lock provide a callback for the "authenticated" event if it is going to redirect browser anyway?


I’m attempting to integrate with the v11 lock and am following instructions provided here:

I have an SPA with a flow where I would like the user to do some stuff, get to a point where they should be challenged for credentials, then be able to continue doing stuff if the login succeeds.

My main question is regarding the lock widget. The documentation suggests that widget will send access/id tokens through the “authenticated” event. However when a user logs in, the browser is redirected to the callback uri and the event listener is now moot since my SPA has just reloaded.

Is this the expected behavior or have I mis-configured something?