Moralis crypto login

Is Moralis.Web3.authenticate() supposed to be used in the frontend or in cloud functions? It returns some sensitive data from the backend if I interpret the documentation correctly

It’s used in the frontend to login users https://youtu.be/6BfOtYfwFBI