N
Nuxt2mo ago
PMDL

Using sidebase/nuxt-auth with GraphQL

Hello everybody, Has anybody got a good resource about how to leverage sidebase's nuxt-auth library, using a local provider, with GraphQL? I'm moving to GraphQL but I also really like sidebase's middlewares for page protection and tools. My auth backend uses GraphQL and provides a typical single endpoint: /graphql and fields for getting token, refresh token and session. From what I gather, what I would need to do is adapt the endpoints part of the configuration: https://auth.sidebase.io/guide/local/quick-start#using-an-external-backend But I really don't know how, or if it's doable at all. What's a reliable way to achieve this?
NuxtAuth
NuxtAuth | Authentication for Nuxt 3
User authentication and sessions via authjs
2 Replies
kapa.ai
kapa.ai2mo ago
Hi @PMDL. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- I'm sorry, but the knowledge sources provided do not contain specific information about integrating sidebase/nuxt-auth with a GraphQL backend, especially regarding adapting the endpoints configuration for a local provider using GraphQL. The sources do discuss authentication in Nuxt using other modules (like nuxt-auth-utils and AuthJs), protecting routes, and general session management, but there is no explicit guidance or example for using sidebase/nuxt-auth with a GraphQL backend or customizing its endpoints for GraphQL mutations and queries. If you need general advice on authentication with Nuxt and GraphQL, you might consider using server routes or middleware to handle authentication logic, as shown in the recipes for session and authentication, but for sidebase/nuxt-auth specifically with GraphQL, the knowledge sources do not provide enough detail to give a reliable answer. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai2mo ago
<@726874652617605150> Kapa.ai is still learning and improving, please let me know how I did by reacting below.

Did you find this page helpful?