• r

    rp

    1 year ago
    Is this intended like this? Yes.
  • r

    rp

    1 year ago
    Cool! So is there anything that you are stuck on at the moment @User ?
  • n

    Nikolai

    1 year ago
    Awesome! 🙂 Two more questions for now:1. Logging in with wrong credentials yields a WrongCredentialsException in the backend. This results in a CORS error in the frontend even though the CORSMiddleware is correctly configured. Even when I add a custom ErrorHandler to FastAPI and return a JSONResponse(200) I get the same CORS error in the frontend. Any ideas? 2. Password recovery via mail works, but email verification doesn't even though I add the EmailVerificationRecipe. No email is received.
  • r

    rp

    1 year ago
    Logging in with wrong credentials yields a WrongCredentialsException in the backend. This results in a CORS error in the frontend even though the CORSMiddleware is correctly configured. Even when I add a custom ErrorHandler to FastAPI and return a JSONResponse(200) I get the same CORS error in the frontend. Any ideas?
    This is where we send the JSON reponse for wrong credentials: https://github.com/supertokens/supertokens-fastapi/blob/fastapi-2.x/supertokens_fastapi/emailpassword/recipe.py#L129. What is the CORS error that you get?
  • r

    rp

    1 year ago
    Regarding the second point, this is the API to send an email verification email: https://github.com/supertokens/supertokens-fastapi/blob/fastapi-2.x/supertokens_fastapi/emailverification/api/generate_email_verify_token.py Perhaps you could add some print statements there to see if it's called, and if it is, where it fails. The default implementation for
    await recipe.config.create_and_send_custom_email(user, email_verify_link)
    is here: https://github.com/supertokens/supertokens-fastapi/blob/fastapi-2.x/supertokens_fastapi/emailverification/utils.py#L31
  • n

    Nikolai

    1 year ago
    Thank you so much for your quick responses @rp!1. I got it fixed by moving the CORSMiddleware to the end of the file where FastAPI app was created 2. I'll look into the links you provided! Thanks 🙂
  • r

    rp

    1 year ago
    sounds good!
  • r

    rp

    1 year ago
    For the fixes you do, it would be great if you could create a PR into our repo 😃)
  • ?

    user

    1 year ago
    Hi, is an elixir/phoenix sdk planned? I saw a github issue for it but it didn't have any responses
  • r

    rp

    1 year ago
    hey @User , we don't have plans for that anytime soon, but you could build the parts you want by copying our node SDK: https://github.com/supertokens/supertokens-node, and the APIs: https://supertokens.io/docs/community/apis