Closed glennovische closed 1 year ago
Oidc use event.node.req
at login process. As https://github.com/unjs/h3/pull/231 mentioned , this error because of the lower version of h3. Upgrade nuxt version to latest can fix this problem.
It fixed some of my problems. To get it fully working i had to remove the if check you did in the template:
if (hash.length > 0 && hash.includes('#'))
In a script tag in the HTML all the important data is shared like my clientSecret and some other important data. Is it possible to hide this else this package is not useable for me and probably alot of other people.
Got it working made a fork with:
First removing
if (hash.length > 0 && hash.includes('#'))
Second editing module.ts line 148 with
let publicOps = Object.assign({}, options.op); let cnfg = Object.assign({}, options.config); delete(publicOps.clientSecret) delete(cnfg.cookieEncryptALGO) delete(cnfg.cookieEncryptIV) delete(cnfg.cookieEncryptKey)
`nuxt.options.runtimeConfig.public.openidConnect = defu(nuxt.options.runtimeConfig.public.openidConnect, {
op: publicOps,
config: cnfg
});`
This worked for me :) See PR
Thanks your PR. dist/
folder files should not be added into git repo. Remove it and i will test it your pr.
After pressing the login button on the default index.vue page
I am redirected to : http://localhost:3000/oidc/login?redirect=/secure
I get the following error: Cannot read properties of undefined (reading 'req')
any ideas how to fix this?