sidebase / nuxt-auth

Authentication built for Nuxt 3! Easily add authentication via OAuth providers, credentials or Email Magic URLs!
https://auth.sidebase.io
MIT License
1.31k stars 164 forks source link

[nuxt] Could not access `then`. The only available runtime config keys on the client side are `public` and `app` #927

Open gabriel-nigro opened 1 month ago

gabriel-nigro commented 1 month ago

Describe the feature

I'm using Sidebase Nuxt-Auth + Nuxt3 + Vuetify3, and I'm getting this annoying warning when I click on the logout button, which calls signOut function.

Environment

❯ npx nuxi info [17:08:40] Working directory: /home/projects/github-dvjyh3 [17:08:40] Nuxt project info:


Reproduction

Link to stackblitz.

Just go to /login page and sign in. Right before you'll be redirected to /home, which have sign out button. Open console and click the button.

Provider

Logs

Warning in Console:

[nuxt] Could not access then. The only available runtime config keys on the client side are public and app. See https://nuxt.com/docs/guide/going-further/runtime-config for more information.

github-actions[bot] commented 4 weeks ago

Hello 👋

Please provide a reproduction for this issue 🙏

How can I create a reproduction? Please use one of the following links to reproduce your issue. - https://stackblitz.com/github/nuxt/starter/tree/v3-stackblitz - https://codesandbox.io/s/github/nuxt/starter/v3-codesandbox Please ensure that the reproduction is as **minimal** as possible. This will allow us to isolate the issue as best as possible. Here are some more amazing posts about the importance of reproductions: - [The Importance of Reproductions](https://antfu.me/posts/why-reproductions-are-required) - [How to Generate a Minimal, Complete, and Verifiable Example](https://stackoverflow.com/help/minimal-reproducible-example)
andrescellini commented 3 weeks ago

having same warning with both signIn and signOut methods using local provider

gabriel-nigro commented 3 weeks ago

Hello 👋

Please provide a reproduction for this issue 🙏

How can I create a reproduction?

Here is the link: https://stackblitz.com/edit/github-dvjyh3

Just go to /login page and sign in. Right before you'll be redirected to /home, which have sign out button.

DavidRoff commented 1 day ago

I have this exact same problem and the signOut() call never completes, so neither the callbackUrl work or any code that would be executed after awaiting the signOut call.