Redirecting the user to a different registration page



  • I'm currently using NodeBB as the forums for a platform that includes more applications (blog, forums and the main app, to be precise) and all the authentication is handled by the app. The three applications share the same credentials, managed by the main app, so you create an account on the main app and you can use it on the blog and the forums. To handle the session tokens and SSO, I'm using Auth0, and with the NodeBB Auth0 plugin I can login and logout on the forums without any problems.

    NodeBB's registration is turned off, as it is handled by the main app, but I still want to allow users to register using the main app registration form.

    Is it possible to make http://<nodebb host>/register redirect the user to my own registration page? Or change where the registration form data is sent to? Any ideas?


  • Admin

    You can use this custom JS to redirect users. Place it in custom header in your nodebb ACP.

    $(window).on('action:ajaxify.end', function(ev, data){
        if (data.url === 'register') {
                window.location.href =  'http://yoursite.com/register';
        }
    });
    

  • Global Moderator

    On top of what @baris said, if you are using a reverse-proxy like nginx, you can add that location to redirect to the same place.


Log in to reply
 


Looks like your connection to NodeBB was lost, please wait while we try to reconnect.