devvit icon indicating copy to clipboard operation
devvit copied to clipboard

Switches to using User Data Directory to store credentials instead of homedir

Open isFakeAccount opened this issue 1 year ago โ€ข 0 comments

๐Ÿ’ธ TL;DR

  • Switches to using User Data Directory to store credentials instead of homedir.
  • If User Data Directory is not applicable for an OS then it falls back on using the homedir to save credentials.

๐Ÿ“œ Details

The goal of this PR is to make devvit conform to each operating system's user data directory guidelines for storing app data instead of creating directory in home directory. This is where the devvit directory will be depending on the OS.

  • Windows: C:\\Users\\<user>\\AppData\\Local\\devvit
  • Mac OS: /Users/<user>/Library/Application Support/devvit
  • Linux: /home/<user>/.local/share/devvit

If none of the OS in the list above matches then it defaults to using homedir for storing credentials.

๐Ÿงช Testing Steps / Validation

This PR hasn't been tested yet because I couldn't build locally on my machine :/

โœ… Checks

  • [ ] CI tests (if present) are passing
  • [ ] Adheres to code style for repo
  • [โœ… ] Contributor License Agreement (CLA) completed if not a Reddit employee

isFakeAccount avatar Jun 20 '24 04:06 isFakeAccount