# Request to \`usernamepassword/login\` takes over 7 seconds

**URL:** <https://community.auth0.com/t/request-to-usernamepassword-login-takes-over-7-seconds/7516>\
**Category:** Get Help\
**Tags:** slow, api-2, loggin\
**Created:** [July 14, 2017, 7:02am UTC](https://community.auth0.com/t/request-to-usernamepassword-login-takes-over-7-seconds/7516 "2017-07-14T07:02:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![julian.kmazo](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@julian.kmazo](https://community.auth0.com/u/julian.kmazo)\
**Post date:** [July 14, 2017, 7:02am UTC](https://community.auth0.com/t/request-to-usernamepassword-login-takes-over-7-seconds/7516/1 "2017-07-14T07:02:27Z")

</div>

I have a react application with an authservice (I followed the examples [github](https://github.com/auth0-samples/auth0-react-sample) that already changed) that uses

```
auth0.redirect.loginWithCredentials()

```

This method generates a call to

```
Request URL:https://[company].auth0.com/usernamepassword/login
Request Method:POST

```

and this request always takes ~ 7 seconds.

I can’t find any [docs](https://auth0.com/docs/api/authentication) for that endpoint or any discussion in this forum about the latency of that endpoint.

For what I could find, that method ( `redirect.logginWithCredentials` ) is gonna be deprecared. Does the endpoint too? Should I use `client.login()` instead? It won’t be as slow as this one?

---

<div class="post-metadata">

**Author:** ![prashantT](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/prashantt/32/6002_2.png) [@prashantT](https://community.auth0.com/u/prashantT)\
**Post date:** [July 14, 2017, 7:38am UTC](https://community.auth0.com/t/request-to-usernamepassword-login-takes-over-7-seconds/7516/2 "2017-07-14T07:38:50Z")

</div>

Seeing as that specific sample is deprecated, I would suggest looking at the latest Quickstarts on how to implement login with the latest SDK:

> **[Auth0 React SDK Quickstarts: Login](https://auth0.com/docs/quickstart/spa/react)**
>
> Auth0 allows you to add authentication to your React application quickly and to gain access to user profile information. This guide demonstrates how to integrate Auth0 with any new or existing React application using the Auth0 React SDK.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [March 2, 2018, 5:55am UTC](https://community.auth0.com/t/request-to-usernamepassword-login-takes-over-7-seconds/7516/3 "2018-03-02T05:55:22Z")

</div>


