Skip to content

Commit

Permalink
fix: App loses auth after update #220
Browse files Browse the repository at this point in the history
  • Loading branch information
akdasa committed May 20, 2023
1 parent de6c83f commit 973d1de
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions src/app/settings/stores/useSettingsStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ export const useSettingsStore = defineStore('settings', () => {
collectionId: '',
sessionId: '',
strategy: '',
refreshedAt: 0
refreshedAt: 0,
expiresAt: 0
})


Expand Down Expand Up @@ -97,11 +98,12 @@ export const useSettingsStore = defineStore('settings', () => {
welcome.value.done = loadedWelcome.done
}
if (loadedAuth) {
auth.value.collectionId = loadedAuth.database
auth.value.collectionId = loadedAuth.collectionId
auth.value.token = loadedAuth.token
auth.value.sessionId = loadedAuth.session
auth.value.sessionId = loadedAuth.sessionId
auth.value.strategy = loadedAuth.strategy
auth.value.refreshedAt = loadedAuth.refreshedAt
auth.value.expiresAt = loadedAuth.expiresAt
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/app/shared/composables/useEnv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export function useEnv() {
}

function isDevelopment() {
return MODE === 'dev' || MODE === 'testing' || MODE === 'testing:dev' || MODE === 'testing:prod'
return ['dev', 'development', 'testing', 'testing:dev', 'testing:prod'].includes(MODE)
}

function getHost() {
Expand Down

0 comments on commit 973d1de

Please sign in to comment.