Unfortunately, you would not be able to connect your DockerHub account to Snyk if you have Two Factor Authentication enabled
We are working on improvements to support this functionality in the future
Possible Workaround
The only possible workaround at this time is After 2FA is turned on you can generate an access token. Once you have it you can replace it with the token password on the Snyk UI which would solve the problem
We are planning to bring access tokens instead of passwords in the future as it is more secure