Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keycloak Cookie not set #19

Closed
dissy123 opened this issue Jul 5, 2023 · 2 comments
Closed

Keycloak Cookie not set #19

dissy123 opened this issue Jul 5, 2023 · 2 comments
Labels
bug Something isn't working good first issue Good for newcomers upstream

Comments

@dissy123
Copy link
Contributor

dissy123 commented Jul 5, 2023

Environment

node 18.0.0
nuxt 3.6.1
nitro 2.5.2

Reproduction

https://github.com/dissy123/authjs-nuxt/tree/main/playgrounds/keycloak

Describe the bug

No cookies are set when signin with keycloak, in keycloak i get a user session after the login attempt

image 1

and this is directly after login:

image

Additional context

No response

Logs

In my monorepo i get the following error message:

montreet:dev: [auth][error][InvalidCheck]: Read more at https://errors.authjs.dev#invalidcheck
montreet:dev: [auth][cause]: InvalidCheck: PKCE code_verifier cookie was missing.
montreet:dev:     at Object.use (file:///Users/matthiasdollfuss/00_Dev/localflow-monorepo/node_modules/.pnpm/@auth+core@0.9.0/node_modules/@auth/core/lib/oauth/checks.js:42:19)
montreet:dev:     at handleOAuth (file:///Users/matthiasdollfuss/00_Dev/localflow-monorepo/node_modules/.pnpm/@auth+core@0.9.0/node_modules/@auth/core/lib/oauth/callback.js:52:44)
montreet:dev:     at async Module.callback (file:///Users/matthiasdollfuss/00_Dev/localflow-monorepo/node_modules/.pnpm/@auth+core@0.9.0/node_modules/@auth/core/lib/routes/callback.js:20:41)
montreet:dev:     at async AuthInternal (file:///Users/matthiasdollfuss/00_Dev/localflow-monorepo/node_modules/.pnpm/@auth+core@0.9.0/node_modules/@auth/core/lib/index.js:65:38)
montreet:dev:     at async Auth (file:///Users/matthiasdollfuss/00_Dev/localflow-monorepo/node_modules/.pnpm/@auth+core@0.9.0/node_modules/@auth/core/index.js:100:30)
montreet:dev:     at async file:///Users/matthiasdollfuss/00_Dev/localflow-monorepo/01_Websites/montreet/.nuxt/dev/index.mjs:745:22
montreet:dev:     at async Object.handler (file:///Users/matthiasdollfuss/00_Dev/localflow-monorepo/node_modules/.pnpm/h3@1.6.6/node_modules/h3/dist/index.mjs:1255:19)
montreet:dev:     at async Server.toNodeHandle (file:///Users/matthiasdollfuss/00_Dev/localflow-monorepo/node_modules/.pnpm/h3@1.6.6/node_modules/h3/dist/index.mjs:1330:7)
montreet:dev: [auth][details]: {
montreet:dev:   "provider": "keycloak"
montreet:dev: }

In the reproduction i don't get an error message.
But the cookies are not set.

@Hebilicious Hebilicious added bug Something isn't working upstream good first issue Good for newcomers labels Jul 5, 2023
@Hebilicious
Copy link
Owner

Hebilicious commented Jul 5, 2023

Hey, Are you able to make it work with authjs directly without this module ? This looks like it could be a provider issue.
We can definitely add a keycloak example to the playground once we resolved this though.

@Hebilicious
Copy link
Owner

Fixed by #38, please re-open if this still happens in latest version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers upstream
Projects
None yet
Development

No branches or pull requests

2 participants