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)
  }


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.
Was this page helpful?