However I noticed that you mentioned the use of the autogenerated password. Unfortunately in a case like this where the password isn't entered into the form, then the code isn't able to log the user in.
Specifically this line below is taking the password from the form and logging in the user.
'user_password' => $_REQUEST['user_pass'],
SO the user needs to actually enter a password on the form for it to work.
Is there a way to use the autogenerated password to auto-login? It defeats the purpose of the auto-generated password and breaks the flow if the user cannot auto-login. In fact, how would the user log in if they don't have a password? They will have to reset the password.
Unfortunately no given how the wp_signon function works. It requires that the password being provided for the user to log in.
Given that the password is auto generated there is no way for us to get this password except through the email that is sent with the user's auto generated password.
This is also custom code so what we can do here is quite limited.
I am happy to write the custom code to get the auto-generated password from WP. Can you tell me when does that happen in the process and which hook in CRED can be used to capture the password and then pass it to a later hook? Maybe I need to use another hook or change priority to auto-login user AND send the password over email? May be the email notification hook can be used?