As of 17.10, you can use snap without sudo and a polkit password window will come up for you to use.
I just learned you can also run snap login and enter your Ubuntu/launchpad credentials. Then you can run snap commands without a password at all! (Obviously only for secure [enough] situations.)
So you can run snap with sudo, just like you need to use sudo to run sudo apt install. For example, to install the ripgrep snap:
sudo snap install rg
You can now leave off the sudo and a password window will appear (and I think this is in 16.04 and maybe 14.04 too, since part of the point of Snaps is that they work the same across versions):
snap install rg
# password window will pop up
What you can also do is log in first, and then you don't need a password:
snap login
# when prompted, enter Ubuntu account email and password
snap install rg
# this works now without sudo or password window appearing
The snap man page has some more details, but not anything about a timeout:
[...]
login
Authenticates on snapd and the store
The login command authenticates on snapd and the snap store and saves
credentials into the ~/.snap/auth.json file. Further communication with
snapd will then be made using those credentials.
Login only works for local users in the sudo, admin or wheel groups.
An account can be setup at https://login.ubuntu.com
[...]