Skip to content

hide .env file on the web #74

Closed
Closed

Description

@rodrigorafaeldamaceno

Hi, thanks for this package.

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?

Screen Shot 2022-10-03 at 12 12 20

Activity

  1. iCodePoet commented on Oct 5, 2022

    @iCodePoet

    Related issue #51

  2. kevtechi commented on Apr 15, 2023

    @kevtechi

    @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.

  3. java-james commented on Oct 18, 2024

    @java-james
    Owner

    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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions