export async function getSession()

in src/frontend/src/store/profile/actions.js [45: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)
    }
  } catch (err) {
    console.log(err)
    if (getters.isAuthenticated) {
      commit('SET_USER')
    }
    throw new Error(err)
  }
  console.groupEnd()
}