---
title: "Discussion on \"Auto-logout user after inactivity - React Native\" | Hashnode"
description: "Discussion on \"Auto-logout user after inactivity - React Native\". Some mobile applications, like financial apps have sensitive data in them. Leaving such data exposed even when the users are not active pose a security flaw as hackers can gain access to the phone and steal the sensitive data. To mitigate this, it is..."
url: "https://hashnode.com/posts/auto-logout-user-after-inactivity-react-native/60719b2e8b2b857c0bdb5c0c"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Auto-logout user after inactivity - React Native](https://facto.hashnode.dev/auto-logout-user-after-inactivity-react-native?utm_source=hashnode&utm_medium=feed)

Some mobile applications, like financial apps have sensitive data in them. Leaving such data exposed even when the users are not active pose a security flaw as hackers can gain access to the phone and steal the sensitive data. To mitigate this, it is...

Apr 10, 2021 · 4 min read · facto.hashnode.dev  
Read the article

-   [#typescript](https://hashnode.com/tag/typescript)
-   [#react-native](https://hashnode.com/tag/react-native)
-   [#security](https://hashnode.com/tag/security)

## Written by

[David Orinameh](https://hashnode.com/@facto)

@facto · Lagos, Nigeria

  
[View profile](https://hashnode.com/@facto)

Software Engineer

I am a Software Engineer with experience in building web and mobile applications.

## Responses 3

Markdown supported · ⌘↵ to post

[justin goh](https://hashnode.com/@fanlit)

[Oct 27, 2023](https://hashnode.com/posts/auto-logout-user-after-inactivity-react-native/60719b2e8b2b857c0bdb5c0c/comment/653b69cc99e256838d609b52)

How do you make this persist across different screens?

[Chidera Paul Ugwuanyi](https://hashnode.com/@chidera)

[Aug 20, 2023](https://hashnode.com/posts/auto-logout-user-after-inactivity-react-native/60719b2e8b2b857c0bdb5c0c/comment/64e1de71926ee7ad857be31c)

Couldn’t get it to work

[Jaqu](https://hashnode.com/@Jaqu)

[Apr 17, 2023](https://hashnode.com/posts/auto-logout-user-after-inactivity-react-native/60719b2e8b2b857c0bdb5c0c/comment/643d3339da81bbd268199d3d)

This doesn't work. Its unable to detext the panResponder and even if I move that code to the same page where I would want to call it I get an unable to itterate error.
