Skip to content

Commit

Permalink
fix: redundant refresh
Browse files Browse the repository at this point in the history
Tsuk1ko committed Aug 11, 2024
1 parent 0c025f6 commit 2a65406
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/store/skland.js
Original file line number Diff line number Diff line change
@@ -73,13 +73,12 @@ export const useSklandStore = defineStore('skland', () => {
});

watch(cred, () => {
if (!credValid.value) return;
if (!credValid.value || canUseOAuth()) return;
resetStates();
});

const refreshCredAndToken = async () => {
const { cred, token } = await sklandOAuthLogin(oauthToken.value);
console.warn('cred, token', { cred, token });
storage.cred.value = cred;
storage.token.value = token;
storage.lastTokenRefresh.value = Date.now();

0 comments on commit 2a65406

Please sign in to comment.