Unable to authenticate for snap use

I am using Ubuntu 20.04.2 and am not a techie.
I posted here a couple of days ago regarding a problem I was having with updating snaps. I could login and logout in the Terminal but in Ubuntu Software two apps shown available for update would not update, apparently for a failure to authenticate using my auth.json file.

I had a couple of responses but no solution. In my confusion and desperation I have now corrupted the auth.json file and don’t know how to re-establish it. This means that I cannot even login or logout in the Terminal. I know for sure that my SSO details are correct: I can log into the Ubuntu site with no problem at all.

So…I am completely confused. I have lost any means to control the updating of snaps on my laptop. Naturally, I am very concerned.

Can anyone help, please?

If you cannot logout, I guess you try to delete (or rename to be safe) the contents ~/.snap/ and try to login again.

mv ~/.snap ~/.snapOLD
snap login

Thanks for your response. FYI, I did receive an excellent reply on my first post:

Through this I confirmed that I had several IDs associated with snapd. So, taking what courage I could, I purged the snapd and then reinstalled it. It seems to have got rid of the problem, at least for the present time. :slight_smile: I am not sure what caused the problem but I am guessing that a relatively recent change of laptop may be associated with it. I had copied folders from the old machine, and these included the snap folders. Maybe the data had somehow accumulated into a confusing mess. Right now I can login and logout of snapd with no problem: the only slight concern I have is that my email address does not appear in parentheses when I ran the http snapd:///v2/users command. When I run snap whomai it correctly shows the email address.