Reset Password Snippet Trouble

Options
Hello, I follow the tutorials to set up the reset password snippet. However, there is a bug where the snippet creates an extra user table which it tied some of the new endpoints.

Can someone give me information on how to resolve this?

Comments

  • Michael Udinski
    Michael Udinski Administrator

    ADMIN

    Options
     - that is not a bug. If you want to use your existing user table instead, you will need to go through each function stack and change the references from the included user table to your pre-existing user table
  • Greg
    Greg Member
    edited October 2022
    Options

    @Michael Udinski Unless I am missing something, there is no way to just change the table reference here (see arrow in image attached). You actually have to delete this function, add a new one and then go through and change every reference along the way. This is an extremally painful process and defeats the core purpose of a snippet.

    If you could just change the table reference here, it seems like all we would have to do is update the schema and the rest of the snippet would work.


  • Michael Udinski
    Michael Udinski Administrator

    ADMIN

    Options

    I agree @Greg it would be awesome to be able to change the table like that. Unfortunately, each table is completely unique with greatly differing schema.

    If you are just changing your user table with similar field names, one short cut would be to make the return variable the same name as the Snippet. This should cut out a lot of the updating work.

  • Greg
    Greg Member
    Options

    @Michael Udinski

    i get it. I think the better thing to implement is the ability to option modify the table a snippet points to during install. I see that extensions allow for this, but not snippets.

  • Michael Udinski
    Michael Udinski Administrator

    ADMIN

    Options

    Yeah, I hear that. We will be revamping Snippets (likely) over the next couple of quarters. We will definitely take a look at adding this in to make things more seamless...

    If you also add this to our feature request board it will help others upvote so we can prioritize it: https://xano.nolt.io/

  • Dave Lundvall
    Options

    I install this reset password snippet successfully (by initial indications in Xano except…) but the functions and APIs are not shown in my workspace. My user table is named users. Anyone know the issues? Another db table was not created btw like the initial issue.

    https://www.xano.com/snippet/8POkfilu/

  • Liz Anaya
    Liz Anaya Member, Administrator

    ADMIN

    Options

    Hi @Dave Lundvall! 👋

    Welcome to the Xano Community! 🎉

    Here is a short clip on how to install the Password Reset snippet. If you are following these instructions and still experiencing issues, please reach out to support, as we might need to take a closer look at your workspace.

  • Dave Lundvall
    Options

    @Liz Anaya thank you! It wasn't working before but finally did.

  • Liz Anaya
    Liz Anaya Member, Administrator

    ADMIN

    Options

    Awesome, @Dave Lundvall! 🙌 Good to hear! Don't hesitate to reach out if any other questions come up. 😊

  • Dave Lundvall
    Options

    @Liz Anaya thanks for your help. Unfortunately, I have a weird problem. I had originally changed my user table to be users (plural). Installing this snippet created the user table with the magic link fields.

    I think these are my options. Either I need to update the users table with the magic link fields and change the APIs to use the users table, or I need to update my WeWeb login logic to use the user table. I can't really figure either of these out but I'm good with whatever approach works. Can you help?

  • Liz Anaya
    Liz Anaya Member, Administrator

    ADMIN

    Options

    Hey @Dave Lundvall! That is correct. When you install the snippet, a user table is automatically generated. Either of these options works. It just depends on the option that is easier for you. If you would like to keep using your users table, you would add the magic link fields to that table and then edit your API endpoint to point to that table.

    Here is a quick video on how you can do that:

    https://www.loom.com/share/73c71e5a26504b30b9ee2d037a3013b5?sid=083acbc7-ebbc-4864-9484-afb3fe743e39

    Let me know if this helps! 😃

  • Dave Lundvall
    Options

    @Liz Anaya awesome! Great help! Thank you very much!