The "mender-cli" utility stores the token under ~/.mender/ , ref: https://sources.debian.org/src/mender-cli/1.1.0-1/cmd/util.go/#L36
Please consider following the XDG Base Directory Specification, see:
Golang seems to have a helper funciton for this specific case, see:
That would mean that cache files (like tokens) normally end up under: ~/.cache/mender/
(but you can override the directory using the standardized environment variables as specified in the xdg base dir spec.)
This is a specific example I've spotted, but it would be nice if the XDG Base directories where adhered to everywhere instead of using "old-school" ~/.mender/ for everything....
PS. Unused/dead code: https://sources.debian.org/src/mender-cli/1.1.0-1/cmd/root.go/#L29