Redirect to localhost instead of domain after signup?

I am using the Universal login page and am having trouble getting my application to redirect after signup. I have this in the embedded login script:

 if(config.extraParams.errorMessage){        
        lock.show({
          flashMessage:{
           type: 'error',
           text: config.extraParams.errorMessage
          }
        });      
    } else {
      lock.show({loginAfterSignup: false});
    }

After signup, the user is redirected to localhost+ my email verification lock, instead of the domain. Callback url is set to the right domain. Any ideas as to what could be going on here?

As usual, asking the question triggers the answer … for anyone else who is looking for this:

I had a rule that redirected after signup, that rule had the hardcoded (:man_facepalming:) url.

HOWEVER, I have a blue/green deployment w/diff urls and wanted it to redirect to the right one … but the hostname triggering the signup isn’t in the context object anywhere so ended up passing a custom defaultDomain param through extraParams (which winds up in context.request.query.defaultDomain) to get the right url to fire in the redirect.

Thus endeth the saga …

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.