Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions frontend/src/store/auth/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// firebase authentication class
import auth from './config'
import CV from './CV'
import { startLoad, endLoad } from '../../utils/helpers'

import { createProfile, updateProfile, getSelf } from '@/utils/api/auth'

Expand Down Expand Up @@ -194,7 +195,9 @@ const actions = {
* If anything fails it clears everything
*/
async checkAuth({ commit, dispatch, state }) {
commit('SET_LOADING', true)
// app loading screen while checking auth
startLoad('Auth')

try {
// returns user object
const user = await new Promise((resolve, reject) => {
Expand Down Expand Up @@ -238,7 +241,8 @@ const actions = {
// Note we _need_ to do this before returning!
commit('SIGNAL_AUTH_CV')

commit('SET_LOADING', false)
// done auth check; show the app
endLoad('Auth')
},

/**
Expand Down