How can we enable Auth0 SSO in Discourse

I’ve tried this with WP Discourse and the Auth0 WordPress plugin. It seems to work correctly both with an Auth0 username/password and with Google authentication. Auth0 is preserving the Discourse SSO redirect parameter over the login request.