Netlify identity events not functional in Vue.js

I have successfully implemented authentication in my site with netlifyIdentity. However, I’m trying to check if user’s login was successful to do other tasks with:

if (action == "login" || action == "signup") {
        netlifyIdentity.open(action);
        netlifyIdentity.on(action, user => {
           console.log(user); 
        })

netlifyIdentity.on never gets called, am I missing anything?

There is a (now old, though still likely relevant) demo on GitHub

I have previously used this without issue.

Hello @jasiqli this doesn’t work, I’ve tried it out.

It works for me when I run it locally (I have just cloned it and tried.)