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

Refresh provider not working #640

Closed
bodgerbarnett opened this issue Jan 17, 2024 · 6 comments
Closed

Refresh provider not working #640

bodgerbarnett opened this issue Jan 17, 2024 · 6 comments

Comments

@bodgerbarnett
Copy link

Environment

  • Operating System: Darwin
  • Node Version: v18.10.0
  • Nuxt Version: 3.9.2
  • CLI Version: 3.10.0
  • Nitro Version: 2.8.1
  • Package Manager: [email protected]
  • Builder: -
  • User Config: devtools, modules, auth
  • Runtime Modules: @sidebase/[email protected]
  • Build Modules: -

Reproduction

No response

Describe the bug

I've got the setup of the local provider right - and it's working, like this:-

export default defineNuxtConfig({
  devtools: {enabled: true},
  modules: ["@sidebase/nuxt-auth"],
  auth: {
    provider: {
      type: "local",
    },
  },
});

but if I try and use the refresh provider:-

export default defineNuxtConfig({
  devtools: {enabled: true},
  modules: ["@sidebase/nuxt-auth"],
  auth: {
    provider: {
      type: "refresh",
    },
  },
});

I get the following error:-

[4:22:18 PM]  ERROR  Importing from server is not allowed in the Vue part of your app. [importing node_modules/@sidebase/nuxt-auth/dist/runtime/server/plugins/refresh-token.server.mjs

Additional context

No response

Logs

No response

@gottafixthat
Copy link

I'm experiencing the exact same issue, slightly different setup:

  • Operating System: Ubuntu 22.04
  • Node Version: v18.19.0
  • Nuxt Version: 3.9.3
  • Vue Version: 3.4.14
  • Nitro Version: 2.8.1
    Package Manager: pnpm 8.14.1
    Runtime Modules: @sidebase/[email protected], @nuxtjs/tailwindcss, nuxt-primevue, daisyui

@flrnt
Copy link
Contributor

flrnt commented Jan 18, 2024

@bodgerbarnett @gottafixthat it has been fixed by @danielroe yesterday #639
we wait for @zoey-kaiser to release it. For now, you can patch it (yarn patch @sidebase/nuxt-auth, pnpm patch ... or whatever package manager you use).
Works fine ! 👌🏻

@zohaibshahzad1990
Copy link

image
I have tried to patch but there is no patch

@flrnt
Copy link
Contributor

flrnt commented Jan 19, 2024

yes because it's up to you to update the package in the node_modules folder before applying this command : npx patch-package @sidebase/nuxt-auth. This command will create things for you automatically based on the patch you did. See patch-package docs

@zoey-kaiser
Copy link
Member

Released in https://github.com/sidebase/nuxt-auth/releases/tag/0.6.5! Sorry for the wait, I was coming home from a trip ❤️

@zohaibshahzad1990
Copy link

Thank you so much

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants