How can I login to web-app via JS code?

Hello. My questions is: how can I connect to web-app, which implements auth0, through JS code? As far as I understand, I need to provide credentials to auth0 api, and auth0 must return me JWT, which I’ll pass to that web-app