Note: if you have purchased the extension on Magento Marketplace (have a paid order) and can not find the product key, please contact us and provide your order number.
Solution for Magento 2 Community Edition (CE / Open Source)
If you get the error "Product Key is empty or invalid. The extension has been automatically disabled." while saving Magefan extension on Magento Community edition and don't see any Product Key field, as on the screenshot: