in src/store/profile/actions.js [44:61]
export async function getSession({ commit, getters }) {
console.group("store/profile/actions/getSession");
console.log("Fetching current session");
try {
const user = await Auth.currentAuthenticatedUser();
if (!getters.isAuthenticated) {
commit("SET_USER", user);
console.groupEnd();
}
} catch (err) {
console.log(err);
if (getters.isAuthenticated) {
commit("SET_USER");
console.groupEnd();
}
throw new Error(err);
}
}