view and action to generate secretcode