Compare commits

...
Sign in to create a new pull request.

2 commits

Author SHA1 Message Date
df550b561a Merge branch 'main' into server-side-token
Some checks failed
ci/woodpecker/push/build-and-publish Pipeline failed
2025-07-17 15:55:11 +02:00
8101c83825
feat: update frontend to expect server to set access token
All checks were successful
ci/woodpecker/push/build-and-publish Pipeline was successful
2025-07-15 17:49:16 +02:00

View file

@ -17,9 +17,8 @@ export const useAuth = () => {
{
email, identifier: username, password: hashedPass, device_name: "Linux Laptop"
}
}) as { access_token: string, refresh_token: string };
});
//authStore.setAccessToken(accessToken);
accessToken.value = res.access_token;
}
async function login(username: string, password: string, device_name: string) {
@ -31,9 +30,8 @@ export const useAuth = () => {
{
username, password: hashedPass, device_name: "Linux Laptop"
}
}) as { access_token: string, refresh_token: string };
});
console.log("hi");
accessToken.value = res.access_token;
console.log("access token:", accessToken.value);
//await fetchUser();
}
@ -67,8 +65,7 @@ export const useAuth = () => {
method: "POST"
}) as any;
console.log("finished refreshing:", res);
if (res && res.access_token) {
accessToken.value = res.access_token;
if (res) {
console.log("set new access token");
} else {
console.log("refresh didn't return access token");