You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using it in a web project, but I noticed that the .env file is available via inspector, I think because it's in assets, is there any way I can hide it?
@rodrigorafaeldamaceno , you shouldn't put secrets on the frontend. It's an env file intended to put endpoints, tokens, flags that will always be visible to the frontend even if compiled into the code.
It's worth mentioning we could add obfuscation to this package to achieve making it harder to extract keys but it would come at a concern of giving the package consumers a false sense of security.
I am going to close the issues for now but if someone would like to discuss if there is value in obfuscation or has another better idea please feel free to open or re open!
Activity
iCodePoet commentedon Oct 5, 2022
Related issue #51
kevtechi commentedon Apr 15, 2023
@rodrigorafaeldamaceno , you shouldn't put secrets on the frontend. It's an env file intended to put endpoints, tokens, flags that will always be visible to the frontend even if compiled into the code.
java-james commentedon Oct 18, 2024
Hey everyone. Thanks for raising and discussing the issue here.
I've appended a section to the readme to be more explicit about the concern. See https://github.com/java-james/flutter_dotenv/blob/master/README.md#security-considerations
It's worth mentioning we could add obfuscation to this package to achieve making it harder to extract keys but it would come at a concern of giving the package consumers a false sense of security.
Related issues raised are
#100
#73
#111
I am going to close the issues for now but if someone would like to discuss if there is value in obfuscation or has another better idea please feel free to open or re open!