snap login fails silently if already logged in

Bug #1658132 reported by Ricardo Kirkner
6
This bug affects 1 person
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.

Revision history for this message
Zygmunt Krynicki (zyga) wrote :

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

Zygmunt Krynicki (zyga)
Changed in snapd:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.