I am trying to use the Xano Auth plugin in order to manage authentication for my WeWeb project.
So I added a workflow on the login form with the xano login action.
However when I click on “test”, the return I get from Xano is not an auth token as expected (wich is the outpout from my login endpoint in Xano) but the data related to the user.
It is like WeWeb didn’t call the auth/login endpoint in Xano but the auth/me endpoint :
The login endpoint URL saved in the Xano Auth plugin is correct, so I have no idea why it seems to be using the auth/me endpoint instead of the login endpoint.
I have just checked the request history of the /auth/login and /auth/me endpoints in Xano, and each time I trigger the “login with Xano” action in WeWeb, it makes two requests: one to the /login endpoint and another to the /me endpoint.
Any idea on why WeWeb is calling the two endpoints instead of just the /login endpoint ?
Yes this call can seem redundant but sometimes the login endpoint does not return the current user, only the 200 status with a token for example. So we manage both endpoints as independent actions.
I will keep it in mind and see if we can optimise it in the future.
So it is perfectly normal that WeWeb is calling both the /login and /me endpoints to get both the token and the user information. I thought I did something wrong.