refactor(frontend): tempt to stop the popup when redrected or coming to the page with no auth
This commit is contained in:
@@ -113,6 +113,10 @@ export async function checkUserAccess({
|
||||
export const authClient = createAuthClient({
|
||||
baseURL: `${window.location.origin}/lst/api/auth`,
|
||||
plugins: [usernameClient()],
|
||||
options: {
|
||||
autoPopup: false,
|
||||
requireAuth: false,
|
||||
},
|
||||
callbacks: {
|
||||
callbacks: {
|
||||
onUpdate: (res: any) => {
|
||||
@@ -121,7 +125,7 @@ export const authClient = createAuthClient({
|
||||
useAuth.getState().setSession(res?.data ?? null);
|
||||
},
|
||||
onSignIn: (res: any) => {
|
||||
console.log("Setting session to ", res?.data);
|
||||
//console.log("Setting session to ", res?.data);
|
||||
useAuth.getState().setSession(res?.data ?? null);
|
||||
},
|
||||
onSignOut: () => {
|
||||
|
||||
Reference in New Issue
Block a user