How show notifications after login/logout in VUE SPA

I want to show notification messages after login/logout (i.e. only changes in authentication status) events while using auth0-spa-js library in a VUE SPA but I was not able, so far, to figure out how.
My code for the click event associated to the login button is:

try {
await this.auth.loginWithRedirect({ redirect_uri: `{baseURL}/default/dashboard/info_project`,
// set locale according to settings stored into vuex state
ui_locales: this.locale
});
// code after loginWithRedirect will not be executed
} catch (error) {
// commit action notify auth error
console.log(error);
}

I tried using VUEX and committing an action before this.$auth.loginWithRedirect() but does not work (does not correctly dispatch the action) while any code after the redirect does not be executed.
Any suggestion or even better example code?
Thanks.

  • Which SDK this is regarding: @auth0/auth0-spa-js
  • SDK Version: 1.14.0
  • Platform Version: @vue/cli 4.5.12