snap login fails silently if already logged in
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
snapd |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
How to reproduce:
$ sudo snap login <email address hidden>
<enter password>
$ cat ~/.snap/auth.json
{..."email": "<email address hidden>"...}
$ sudo snap login <email address hidden>
<enter password>
$ cat ~/.snap/auth.json
{..."email": "<email address hidden>"...}
However if you first log out
$ sudo snap logout
$ cat ~/.snap/auth.json
cat: ~/.snap/auth.json: No such file or directory
$ sudo snap login <email address hidden>
<enter password>
$ cat ~/.snap/auth.json
{..."email": "<email address hidden>"...}
Expected result:
Whenever snap login completes successfully, the auth.json file should be updated to reflect the latest credentials used.
Having a snap whoami command (or similar) would help a lot to show which account is currently logged in.
Changed in snapd: | |
status: | New → Fix Released |
I just tested this on 2.27.2 and:
- snap login can be invoked many times, without an error
- snap whoami command exists and prints the email address of the logged-in user.
I'm thus marking this as FIX-RELEASED