what is the logic for auth key