Ive been trying to look for where is it that it is restricting me from accessing the dashboard if im not logged in.
Need to make some mods to it. And adjust to my google login.
Thank you.
To better understand the issue you are facing, could you please share the relevant portions of your code? Specifically, we would like to see the parts where you have added passport Authguards and any related configurations.
You can use a code-sharing platform like GitHub Gist and share the link with us.
Thanks
Error Every time I try to use my passport Authguards in the metronic theme from my NestJS backend.
./backend/node_modules/@nestjs/common/utils/load-package.util.js:12:35-55 - Warning: Critical dependency: the request of a dependency is an expression
./backend/node_modules/@nestjs/common/file-stream/streamable-file.js:7:17-34 - Error: Module not found: Error: Can't resolve 'stream' in '/Users/kenflores/Development/InternalApps/radiantDataPortal/RadiantDataApi/backend/node_modules/@nestjs/common/file-stream'
BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.
If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "stream": require.resolve("stream-browserify") }'
- install 'stream-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "stream": false }
./backend/node_modules/@nestjs/common/file-stream/streamable-file.js:8:15-30 - Error: Module not found: Error: Can't resolve 'util' in '/Users/kenflores/Development/InternalApps/radiantDataPortal/RadiantDataApi/backend/node_modules/@nestjs/common/file-stream'
BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.
If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "util": require.resolve("util/") }'
- install 'util'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "util": false }
./backend/node_modules/@nestjs/common/pipes/validation.pipe.js:10:15-30 - Error: Module not found: Error: Can't resolve 'util' in '/Users/kenflores/Development/InternalApps/radiantDataPortal/RadiantDataApi/backend/node_modules/@nestjs/common/pipes'
BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.
If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "util": require.resolve("util/") }'
- install 'util'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "util": false }
./backend/node_modules/passport/lib/middleware/authenticate.js:4:11-26 - Error: Module not found: Error: Can't resolve 'http' in '/Users/kenflores/Development/InternalApps/radiantDataPortal/RadiantDataApi/backend/node_modules/passport/lib/middleware'
BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.
If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "http": require.resolve("stream-http") }'
- install 'stream-http'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "http": false }
./backend/node_modules/passport/lib/strategies/session.js:5:9-24 - Error: Module not found: Error: Can't resolve 'util' in '/Users/kenflores/Development/InternalApps/radiantDataPortal/RadiantDataApi/backend/node_modules/passport/lib/strategies'
BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.
If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "util": require.resolve("util/") }'
- install 'util'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "util": false }
Hi,
You can find the restriction access code in the file /angular/demo1/src/app/app-routing.module.ts. Within this file, there is a route defined with an AuthGuard that restricts access to the dashboard unless the user is logged in. The specific code snippet looks like this:
{
path: "",
canActivate: [AuthGuard],
loadChildren: () => import("./_metronic/layout/layout.module").then((m) => m.LayoutModule),
},