Hi everyone,
I’m trying to setup MFA authentication. I have the logic pretty clear, but unfortunately it’s not working as I was expecting.
I created a login endpoint in Xano and I setup that login endpoint in the auth plugin in weweb.
My login endpoint in Xano was supposed to have 4 inputs:
user/password - challenge id / otp
The logic I planned to use was the following:
- If the user/password is correct, and MFA is not enabled for the user, I’d automatically execute the login.
- If the user/password is correct, and MFA is enabled for the user, the login endpoint provides the challenge id and sends the OTP to the user.
- Then the login is executed again with the challenge id and the otp. If everything is correct, the user is logged in.
The problem I found: when I first execute the login, if the value I send back is the challenge id instead of the auth token, I get an error (expected) BUT I can’t see anywhere the actual API response.
The alternative is setting up two endpoints, one with the logic and another one with the actual login, but that involves sending the user+password two times to Xano which is far from ideal from a security perspective.
I’ve tried sending back the challenge id enclosed as an “auth token”, but even if I do that I can’t retrieve the value. I see it on the debugger but I can’t put it on a variable.
Any thoughts?
Thank you!

