Step 4: Visited the wp-login.php and if I press the Log in with Discourse link or if I use this shortcode [discourse_connect_client] on any page, it gives me a 404 error on Discourse.
Thanks for your help, now is working. And btw I was getting this error because I pasted my website URL with https:// in front (it should be just yourwebsite.com):
“Authentication failed due to missing secret. Contact the site administrators to fix this problem.”
And I must say that these settings are a bit confusing. As in your image, I should’ve enabled the Discourse Connect Provider option on Discourse, although the DiscourseConnect Provider tab on WP says the opposite of what I wanted:
" Enabling your site to function as the DiscourseConnect provider transfers all user authentication from Discourse to WordPress.".
They should be renamed and or/separated by a title or maybe on different tabs as they are on WordPress.