#Help with supabase

1 messages · Page 1 of 1 (latest)

swift wedge
#

how to create a full auth system in next on fe and in be with hono with gmail login using supabase ?

vagrant helmBOT
#

Hi @swift wedge. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

I apologize, but I don't have enough specific information in the provided knowledge sources to give you a complete step-by-step guide on creating a full auth system in Next.js frontend and Hono backend with Gmail login using Supabase. However, I can provide some general guidance based on the available information:

For the Next.js frontend:

  1. You can use the Supabase client library for Next.js. The Supabase Next.js template mentions that it works across the entire Next.js stack, including App Router, Pages Router, Middleware, Client, and Server.

  2. To set up Supabase in your Next.js project, you'll need to add the following environment variables:

    NEXT_PUBLIC_SUPABASE_URL=your_supabase_project_url
    NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
    
  3. For Gmail login, you'll need to set up Google OAuth. The Next.js SaaS Starter template mentions configuring Google OAuth by following Supabase's instructions and adding GOOGLE_OAUTH_CLIENT_ID and GOOGLE_OAUTH_CLIENT_SECRET to your .env file.

For more detailed information on setting up Supabase auth with Next.js, you can refer to the Supabase Next.js quickstart guide.

Unfortunately, the knowledge sources don't provide information about integrating Supabase auth with a Hono backend. You might need to consult Hono's documentation and Supabase's API documentation to implement this part of your system.

Remember to handle authentication state, protected routes, and user sessions in your Next.js application. The Supabase client library should provide methods to help with these tasks.

#

For a more comprehensive guide, I recommend checking out the official Supabase documentation and examples for Next.js integration.

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: