Coder Social home page Coder Social logo

Comments (3)

kangmingtay avatar kangmingtay commented on July 20, 2024

hi @psiaux, can you please reach out to us via support at http://supabase.help? this is usually an indication that your custom SMTP server config is incorrect

from gotrue.

mousindev avatar mousindev commented on July 20, 2024

Hi all, I am receiving the same error all of a sudden (was working fine few days ago and don't recall having made any change in this area) and in my case I am not using ReSend or any other service, it is Supabase sending the email.
The funny thing is that despite the error received when using the function signInWithOtp() the email arrives correctly, but then when I try to verify the OTP code with verifyOtp() I get a second error that looks like this:

AuthApiError: Token has expired or is invalid
    at handleError (webpack-internal:///(action-browser)/./node_modules/@supabase/gotrue-js/dist/module/lib/fetch.js:46:11)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async _handleRequest (webpack-internal:///(action-browser)/./node_modules/@supabase/gotrue-js/dist/module/lib/fetch.js:93:9)
    at async _request (webpack-internal:///(action-browser)/./node_modules/@supabase/gotrue-js/dist/module/lib/fetch.js:73:18)
    at async SupabaseAuthClient.verifyOtp (webpack-internal:///(action-browser)/./node_modules/@supabase/gotrue-js/dist/module/GoTrueClient.js:615:37)
    at async verifyEmailWithOTP (webpack-internal:///(action-browser)/./app/_services/auth.ts:100:29)
    at async /node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js:39:406
    at async t0 (/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js:38:5773)
    at async rh (/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js:39:23636)
    at async doRender (/node_modules/next/dist/server/base-server.js:1391:30)
    at async cacheEntry.responseCache.get.routeKind (/node_modules/next/dist/server/base-server.js:1552:28)
    at async DevServer.renderToResponseWithComponentsImpl (/node_modules/next/dist/server/base-server.js:1460:28)
    at async DevServer.renderPageComponent (/node_modules/next/dist/server/base-server.js:1843:24)
    at async DevServer.renderToResponseImpl (/node_modules/next/dist/server/base-server.js:1881:32)
    at async DevServer.pipeImpl (/node_modules/next/dist/server/base-server.js:909:25)
    at async NextNodeServer.handleCatchallRenderRequest (/node_modules/next/dist/server/next-server.js:266:17)
    at async DevServer.handleRequestImpl (/node_modules/next/dist/server/base-server.js:805:17) {
  __isAuthError: true,
  status: 401

from gotrue.

mousindev avatar mousindev commented on July 20, 2024

Hi, in my case I found what is creating the issue. I added yesterday two triggers on auth.users listening to the creation and the update of an user, that will call a function to either replicate or update the user into the table public.users.
I guess the supabaseauth.signInWithOTP() method updates the user (maybe the last time it was sent a magic link / OTP?) and by getting the 500 I am guessing there is an error in my update function (though is the same I used in another project with the exact same schema, but will look closer into it)

from gotrue.

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.