Redirect to URL after signup

I have AuthO connecting through to our PaaS Integration Platform. All works fine. Users are authenticated / created and redirected to the PaaS endpoint.

I am now trying to setup Email Verification of users that sign up. I have used the default “Force email verification” rule template. Again the email verification arrives correctly, BUT, the signup process continues to try and redirect to the PaaS, where the login attempt fails as AuthO hasn’t passed the full SAML doc as the user is still unverified.

What am I missing here?

Thanks

1 Like

Not sure why but it turned out that I needed to have a return within the if(...) statement!?

Full code posted below:

function (user, context, callback) {
  if (!user.email_verified) {
    context.redirect = {
        url: "https://your-url"
    };
    return callback(null, user, context); 
  }
  else {
    return callback(null, user, context);  
  }
}
1 Like