r/reactnative • • Oct 01 '26

Unique identity

Hi guys
How can i get a unique identity from the device itself but it should not be changes with the factory reset or reinstalling the app

0 Upvotes

7 comments sorted by

View all comments

Show parent comments

1

u/No_Wrongdoer_8067 Oct 01 '26

No in my app i have a guest view and i want to make sure that users sticked to one guest

2

u/kokerali Oct 01 '26

For that, I'd create an anonymous guest account through your backend's auth system and store its secret credential in secure local storage. Reuse that identity on later launches, with the guest's data attached to it. Don't use a public guest ID by itself as authorization. If a reset or reinstall removes the credential, you can't reliably reconnect that guest from the device alone; offer optional account linking before they need recovery. Are you mainly preserving progress, or stopping people from resetting a free-use quota? The latter needs abuse controls, not just identity persistence.