I'd like to release a closed alpha of my game. I imagine an approach where I distribute premade alpha keys. When a player registers, she has to provide her key. If the key is valid and not already used by someone else, the registrations goes through, otherwise it doesn't. If registration goes through, the key should obviously be removed from the list of valid keys.
What would be the easiest/best approach?
Edit: My game is built in Unity for PC/Mac. Players register with email-adress when they first start the game. There's no anonymous registration.