fission-codes / auth-lobby

The authentication service that Fission services run.
https://auth.fission.codes
GNU Affero General Public License v3.0
12 stars 1 forks source link

Multiple auth windows open may cause issues #16

Closed bmann closed 4 years ago

bmann commented 4 years ago

I'm filing this as a bug, but there's a workaround so just leaving this here for now.

So, I think having multiple auth windows open may cause an issue.

Got an error during the exchange:
Problem with the given value: { "did": "did:key:z13V3Sog2YaUKhdGCmgx9UZuW1o1ShFJYc6DvGYe7NTt689NoL3pNNDgsaaADZ8LACiPiuayDbqGm7H948gi2tDVHQbSxjicpXKAJSx2Ls4BeUiymtRr858h51QHwZLZk6D9jG2kKdfDfHeV9L2jFetUUDTCXDyPbonk1fzGnPSyrGPheFsYaPN2VABzos5cvw1zyGKCzH5su5vcFuoSBubdvXXreBeoghgn18ThsbShvtYrSmGcZT1UmBR2sQedJp4ZUiBxrv6DbyPQvsYu9brj7mnHvzMXkiqKEkvoafpAkxcJc827SsNvbCxNdg2EkJisbGyX7YEvEkYiqddUqAAwSSw15kMUMrnm6Y9L3t8ugFtLcf5HyGShKY5ZV4t7RmL26M4JknmXXwNbrVUF68Q", "nonceRandom": "031053", "signature": "Q2m1TEvG0d0xE7G8Xt0DkH0AJxaauOI8f1m8oyl+AnIubMOQMpWa5mfNflaXiHzyFceIDsc861aqcT8hMlUmV1id/IYkQhhgdI+BQCgjL6TuezYwZmRmRUIi1NywZCv4XOOEQhSxCkFQhXV9ksg5cGxYoqpebQnm/vA4x+onWssMUa7PL1jIY9+ov/2Jlap/lbH1qO4yag2yZLH9Jeyg5wyhhS/xQSHjkig4W6eYOuO3kHy/pu4Bb4B5Q7xFcrx8dsLN7kpXumSRCtu/Cg/b3VdCPEApqE/pvSTRvkNz7vvlO4zqgqNncmlYNdgJ/K8TcoWyviA17pgpFTkbJjZptw==", "from": "QmVsoptAAv8arfV7FRUvNJcXqKebn4fzeyHznB6BR2tS6o", "timestamp": 1598643077340 } Expecting an OBJECT with a field named `nonceUser`
icidasset commented 4 years ago

Fixed this on master, will deploy this together with the permission UI.

I opted for a "simple" fix, which picks the device that responds the fastest on pubsub. The "not-accepted" devices will get a standard browser alert with a message saying you need to look at your other device. Didn't want to do a proper UI for this, yet, as I think it'll be an uncommon scenario.