mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-11-01 02:33:22 -04:00
fix: Remove Double Cookie Refresh (#6242)
This commit is contained in:
@@ -37,11 +37,6 @@ export const useMealieAuth = function () {
|
|||||||
{ immediate: true },
|
{ immediate: true },
|
||||||
);
|
);
|
||||||
|
|
||||||
async function signIn(...params: Parameters<typeof auth.signIn>) {
|
|
||||||
await auth.signIn(...params);
|
|
||||||
refreshCookie(useRuntimeConfig().public.AUTH_TOKEN);
|
|
||||||
}
|
|
||||||
|
|
||||||
async function oauthSignIn() {
|
async function oauthSignIn() {
|
||||||
const params = new URLSearchParams(window.location.search);
|
const params = new URLSearchParams(window.location.search);
|
||||||
const { data: token } = await $axios.get<{ access_token: string; token_type: "bearer" }>("/api/auth/oauth/callback", { params });
|
const { data: token } = await $axios.get<{ access_token: string; token_type: "bearer" }>("/api/auth/oauth/callback", { params });
|
||||||
@@ -52,7 +47,7 @@ export const useMealieAuth = function () {
|
|||||||
return {
|
return {
|
||||||
user,
|
user,
|
||||||
loggedIn,
|
loggedIn,
|
||||||
signIn,
|
signIn: auth.signIn,
|
||||||
signOut: auth.signOut,
|
signOut: auth.signOut,
|
||||||
signUp: auth.signUp,
|
signUp: auth.signUp,
|
||||||
refresh: auth.refresh,
|
refresh: auth.refresh,
|
||||||
|
|||||||
Reference in New Issue
Block a user