feat: added check for if refresh returned access token
This commit is contained in:
parent
7ad2b6f299
commit
a5f0e19716
1 changed files with 11 additions and 7 deletions
|
@ -64,8 +64,12 @@ export const useAuth = () => {
|
|||
method: "POST"
|
||||
}) as any;
|
||||
console.log("finished refreshing:", res);
|
||||
accessToken.value = res?.access_token;
|
||||
if (res.access_token) {
|
||||
accessToken.value = res.access_token;
|
||||
console.log("set new access token");
|
||||
} else {
|
||||
console.log("refresh didn't return access token");
|
||||
}
|
||||
}
|
||||
|
||||
async function fetchUser() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue