Code Monkey home page Code Monkey logo

Comments (4)

jan-tennert avatar jan-tennert commented on May 20, 2024 1

What is your question?

I'm using GoTrue to build authentication in my app. After signing up, I use goTrue.loginWith(Email) and got an exception. Did I miss any configuration? Here's the message I got:

invalid_grant 
URL: https://jzdduyzfelmfniuebkre.supabase.co/auth/v1/token?grant_type=password&redirect_to=supabase%3A%2F%2Flogin
Headers: [apikey=[eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Imp6ZGR1eXpmZWxtZm5pdWVia3JlIiwicm9sZSI6ImFub24iLCJpYXQiOjE2ODA2OTUwODMsImV4cCI6MTk5NjI3MTA4M30.Eo29b7weMkAOucfGa0eRbb7fZR7Cpw1_Ifde_FV3zGc], Accept=[application/json], Accept-Charset=[UTF-8]]
Http Method: POST

How I provide GoTrue:

createSupabaseClient(
            supabaseUrl = BuildConfig.SUPABASE_URL,
            supabaseKey = BuildConfig.API_KEY
        ) {
            install(GoTrue)
        }.gotrue

How I call signin (authService has type of GoTrue):

authService.loginWith(Email) {
            this.email = email
            this.password = password
        }

Could also be that the user didn't confirm their email, gonna include that error in the next version

from supabase-kt.

jan-tennert avatar jan-tennert commented on May 20, 2024 1

If you want to disable that the user has to confirm their email, disable it in supabase. Otherwise you can setup deeplinking so the user can login directly into your app by clicking on the link in the verification (see wiki for login)

from supabase-kt.

jan-tennert avatar jan-tennert commented on May 20, 2024

That looks alright, is that the whole error? And also are the credentials valid?

from supabase-kt.

hieuwu avatar hieuwu commented on May 20, 2024

Strange.

What is your question?

I'm using GoTrue to build authentication in my app. After signing up, I use goTrue.loginWith(Email) and got an exception. Did I miss any configuration? Here's the message I got:

invalid_grant 
URL: https://jzdduyzfelmfniuebkre.supabase.co/auth/v1/token?grant_type=password&redirect_to=supabase%3A%2F%2Flogin
Headers: [apikey=[eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Imp6ZGR1eXpmZWxtZm5pdWVia3JlIiwicm9sZSI6ImFub24iLCJpYXQiOjE2ODA2OTUwODMsImV4cCI6MTk5NjI3MTA4M30.Eo29b7weMkAOucfGa0eRbb7fZR7Cpw1_Ifde_FV3zGc], Accept=[application/json], Accept-Charset=[UTF-8]]
Http Method: POST

How I provide GoTrue:

createSupabaseClient(
            supabaseUrl = BuildConfig.SUPABASE_URL,
            supabaseKey = BuildConfig.API_KEY
        ) {
            install(GoTrue)
        }.gotrue

How I call signin (authService has type of GoTrue):

authService.loginWith(Email) {
            this.email = email
            this.password = password
        }

Could also be that the user didn't confirm their email, gonna include that error in the next version

Just tried and it works now. This is mostly because of the account is not verified yet and it's not existed. Thanks for the improvement on the exception message. Appreciate that mate ! 🤜🤛

from supabase-kt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.