gun icon indicating copy to clipboard operation
gun copied to clipboard

[Bug] Authentication: Username alias issue

Open mangledbottles opened this issue 3 years ago • 1 comments

Hello, I have found a bug while implementing Gun authentication.

  • I decided to create username alias automatically using UUID v4 (eg bfa8dfe7-5998-472e-9466-ba88a816d6e5)
  • On sign up, the user is logged in immediately and that works fine
  • When the user logs out and attempts to login again, the username is not found and cannot login

I have isolated this issue to the symbol "-". When this is used, the alias lookup does not work. UUID v4 works when this symbol is removed with username = uuidv4().split("-").join("");

mangledbottles avatar Jan 09 '22 15:01 mangledbottles

Oh boy... I'm scared this will be ugly. Thanks for the report!

Anyone willing to tackle it?

amark avatar Feb 19 '22 05:02 amark