I think you may try user_register hook for this purpose, because it gives you user’s id, which you need to add user meta.
According to WP documentation:
This action hook allows you to access data for a new user immediately after they are added to the database. The user id is passed to hook as an argument.
add_action( 'user_register', 'myplugin_registration_save', 10, 1 );
function myplugin_registration_save( $user_id ) {
/*
Create your **$unique_key** here and add it as user meta below
*/
update_user_meta($user_id, 'unique_key', $unique_key);
}