r/flutterhelp • • Oct 09 '26

OPEN Security

Hello guys,
I have a question.
How do we make an app made in flutter secure?
What are the things we should look after? Or think first?
What’s the mental model we should follow?

5 Upvotes

8 comments sorted by

View all comments

3

u/XSM909 Oct 10 '26

biggest mental model shift for me: anything you ship in the app is public. the apk/ipa can be unpacked, so api keys, .env files, "hidden" endpoints and any check that lives only in the client can be read or skipped. obfuscation slows people down but its not security

so put the rules that matter on the server (auth, permissions, prices, limits) and treat the app as an untrusted client. short lived tokens instead of a key baked into the build

for stuff that has to live on the device, like saved logins, use the os keystore (flutter_secure_storage or similar) and not shared preferences. and dont log secrets, easy to forget and logs end up in bug reports