Display Authentication error in Bubble when credentials are not ok

Options
I worked with the videos from Michael to get Bubble authentication up and running, and all was great except for the use case when a user enters a wrong email and password.

I use the default code for login that comes with Xano, so when there is an error in login an Access Denied is sent. In Bubble I do not seem to be able to catch this and display a nicely formatted error message to the end user. Was thinking of rewriting the message and always send back a code, and check the code (though I cannot really see how to do that in Bubble). 

I get this popup which is not UI friendly. [image.png]
Is there any tutorial / documentation / blog post that anyone knows of that shows how to handle the failed authentication issue in the frontend of Bubble?

I found this article from Backendless (link), but they just leave it as is so I have a feeling this problem is not solved regardless of the backend. 

Any ideas are most welcome!

Comments

  • Michael Udinski
    Michael Udinski Administrator

    ADMIN

    Options
    Hm.. there may not be around that on the Bubble side of things. I could try to play around with it but they might stick you with that pop up. Would Bubble test app be different than the live app?
  • Vlad B
    Vlad B Member
    Options
    I think I found a way around it. I do not understand how it works though. On the first workflow i have the signin call to Xano. The second one is triggered if an error appears in first workflow. In works, not sure 100% why, as in theory Access Denied is not an error, but I assume Bubble is treating it as an error on their end. 

    [image.png]
  • Felipe Letelier
    Options
    If still needed, there are 3 ways to handle this in bubble, the first one is the one you mentioned. Other way is checking the "Include errors in response..." option to store the "error" response in your schema and make it available for conditionals and workflows (this is the best way in my opinion). And the third option is adding the "error" response manually to your schema, press on "Manually enter API response", and type the JSON/Schema yourself (tip: please save the success response schema and then add yourself the error response like: "error":"sample error", just make sure that the error key is the same you receive when entering the wrong credentials)[image.png]