# React Native SDK taking 5 seconds for login

**URL:** <https://devforum.okta.com/t/react-native-sdk-taking-5-seconds-for-login/16363>\
**Category:** Questions\
**Created:** [September 28, 2021, 3:09pm UTC](https://devforum.okta.com/t/react-native-sdk-taking-5-seconds-for-login/16363 "2021-09-28T15:09:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rakesh.bhati](https://avatars.discourse-cdn.com/v4/letter/r/edb3f5/32.png) [@rakesh.bhati](https://devforum.okta.com/u/rakesh.bhati)\
**Post date:** [September 28, 2021, 3:09pm UTC](https://devforum.okta.com/t/react-native-sdk-taking-5-seconds-for-login/16363/1 "2021-09-28T15:09:29Z")

</div>

Hi Team,

Our react native SDK is taking 5 seconds to Login in the user in Production.

Could you please let me know what can be done to reduce the time taken for login?

Also, when i enter wrong credentials i am not getting any error if the user is locked\_out

Below is the code i have used.

signIn({ username: “{username}”, password: “{password}” })  
.then(token =\> {  
// consume accessToken from token.access\_token  
})  
.catch(error =\> {  
// { code: “”, message: “”, detail: { message: “”, status: “” } }  
// handle error  
})

---

<div class="post-metadata">

**Author:** ![andrea](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/andrea/32/2172_2.png) [@andrea](https://devforum.okta.com/u/andrea)\
**Post date:** [February 8, 2024, 7:31pm UTC](https://devforum.okta.com/t/react-native-sdk-taking-5-seconds-for-login/16363/2 "2024-02-08T19:31:14Z")

</div>

Closed on February 8, 2024, 7:31pm UTC


