Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question]: Unreasonable exeption when sign in with email. #115

Closed
hieuwu opened this issue Apr 21, 2023 · 4 comments
Closed

[Question]: Unreasonable exeption when sign in with email. #115

hieuwu opened this issue Apr 21, 2023 · 4 comments
Assignees
Labels
question Further information is requested

Comments

@hieuwu
Copy link
Contributor

hieuwu commented Apr 21, 2023

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
        }
@hieuwu hieuwu added the question Further information is requested label Apr 21, 2023
@jan-tennert
Copy link
Collaborator

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

@jan-tennert
Copy link
Collaborator

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

@jan-tennert
Copy link
Collaborator

jan-tennert commented Apr 21, 2023

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)

jan-tennert added a commit that referenced this issue Apr 21, 2023
Signed-off-by: TheRealJan <jan.m.tennert@gmail.com>
@hieuwu
Copy link
Contributor Author

hieuwu commented Apr 22, 2023

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 ! 🤜🤛

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants