Failing to store a token in the keyring results in a verification email

Bug #693531 reported by Anthony Lenton
30
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Ubuntu Single Sign On Client
Fix Released
High
Natalia Bidart

Bug Description

Under certain circumstances, when you sign in using your standard SSO creds ubuntu-sso-client will say it has sent you a verification email, even though your email is already verified. What's worse, this verification email is then never sent/received.

nessita pointed at the following lines of code:

main.py:197:
            if is_validated:
                # pylint: disable=E1101
                d = Keyring().set_credentials(app_name, credentials)
                d.addCallback(lambda _: self.LoggedIn(app_name, email))
                d.addErrback(lambda _: self.UserNotValidated(app_name, email))

That say the real problem is that the app is failing to store the newly created token in the keyring, and is then emitting UserNotValidated (instead of LoginError), that triggers the message saying a verification email has been sent. This email is then not sent at all, as the email is actually already verified.

The other (underlying) question is why the keyring is refusing to store the credentials at all.

Related branches

Changed in ubuntu-sso-client:
status: New → Confirmed
importance: Undecided → High
Changed in ubuntu-sso-client:
status: Confirmed → In Progress
assignee: nobody → Naty Bidart (nataliabidart)
Changed in ubuntu-sso-client:
status: In Progress → Fix Committed
Changed in ubuntu-sso-client:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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