Step 1. Be sure to log in to your account on Legion.
Step 2. Open the "Settings" section.
Step 3. Find the "Connected Accounts" tab.
Step 4. Click on the "Unlink Github" button.
Step 5. Back to your Github account and click on the "Profile" button.
Step 6. Find the "Settings" section.
Step 7. Open the "Applications" tab.
Step 8. Be sure to find Legion there and click on the "Revoke" button.
Done!