Browse Source

Merge pull request #4306 from nocodb/fix/auth

fix(nc-gui): ref access in auth middleware
pull/4367/head
Pranav C 2 years ago committed by GitHub
parent
commit
cd4abaf7be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      packages/nc-gui/middleware/auth.global.ts

2
packages/nc-gui/middleware/auth.global.ts

@ -37,7 +37,7 @@ export default defineNuxtRouteMiddleware(async (to, from) => {
const { allRoles } = useRoles()
/** if user isn't signed in and google auth is enabled, try to check if sign-in data is present */
if (!state.signedIn && state.appInfo.value.googleAuthEnabled) await tryGoogleAuth(api, state.signIn)
if (!state.signedIn.value && state.appInfo.value.googleAuthEnabled) await tryGoogleAuth(api, state.signIn)
/** if public allow all visitors */
if (to.meta.public) return

Loading…
Cancel
Save