© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•13mo ago•
3 replies
CustomEntity

Adonis + Supabase how to login with Google

Hi, I'm using Supabase with the Adonis framework and I currently have the following code:

async signInWithGoogle({ request, response }: HttpContext) {
    const { data, error } = await this.auth.signInWithOAuth({
      provider: 'google',
      options: {
        queryParams: {
          access_type: 'offline',
          prompt: 'consent',
        },
      },
    })

    if (error) {
      return response.status(400).json({ error: error.message })
    }

    return response.redirect().toPath(data.url)
  }
async signInWithGoogle({ request, response }: HttpContext) {
    const { data, error } = await this.auth.signInWithOAuth({
      provider: 'google',
      options: {
        queryParams: {
          access_type: 'offline',
          prompt: 'consent',
        },
      },
    })

    if (error) {
      return response.status(400).json({ error: error.message })
    }

    return response.redirect().toPath(data.url)
  }


However after connecting with google I have no cookie set. I tried to retrieve the login callback but it sends the credentials in the url fragment so I don't have access to it on the server side.
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Angular Login with Google
SupabaseSSupabase / help-and-questions
4y ago
How to verify google oauth using supabase?
SupabaseSSupabase / help-and-questions
4y ago
Supabase Signin with google issue
SupabaseSSupabase / help-and-questions
8mo ago
Supabase Google OAuth with birthdate
SupabaseSSupabase / help-and-questions
13mo ago