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({
|
export const authClient = createAuthClient({
|
||||||
baseURL: `${window.location.origin}/lst/api/auth`,
|
baseURL: `${window.location.origin}/lst/api/auth`,
|
||||||
plugins: [usernameClient()],
|
plugins: [usernameClient()],
|
||||||
|
options: {
|
||||||
|
autoPopup: false,
|
||||||
|
requireAuth: false,
|
||||||
|
},
|
||||||
callbacks: {
|
callbacks: {
|
||||||
callbacks: {
|
callbacks: {
|
||||||
onUpdate: (res: any) => {
|
onUpdate: (res: any) => {
|
||||||
@@ -121,7 +125,7 @@ export const authClient = createAuthClient({
|
|||||||
useAuth.getState().setSession(res?.data ?? null);
|
useAuth.getState().setSession(res?.data ?? null);
|
||||||
},
|
},
|
||||||
onSignIn: (res: any) => {
|
onSignIn: (res: any) => {
|
||||||
console.log("Setting session to ", res?.data);
|
//console.log("Setting session to ", res?.data);
|
||||||
useAuth.getState().setSession(res?.data ?? null);
|
useAuth.getState().setSession(res?.data ?? null);
|
||||||
},
|
},
|
||||||
onSignOut: () => {
|
onSignOut: () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user