Rule not redirecting

Scenario

  1. A user is trying to sign up and clicks SIGN UP → in Lock widget (we use it as a js lib)

  2. Request is passing via a rule that shall redirect to our server. It is 1 of the 2 rules we have:

    function (user, context, callback) {
    context.redirect = {
    url: ‘https://bbca5192.ngrok.io/webapp/api/v1/auth0/users/sign-up
    };

    return callback(null, user, context);
    }

  3. The second rule just dumps the contents of user and contextto https://requestb.in:

    “redirect”:{
    “url”:“https://bbca5192.ngrok.io/webapp/api/v1/auth0/users/sign-up
    }

  4. The server is never reached.

Summary

I can see the rule worked, just the redirect didn’t happen. What can I do? I tested the request from postman and it worked. The server is waiting for GET. If at least the server was hit I would have something in my logs.

Is it because we are not using the hosted lock?

Am I missing something OR is it a bug?

1 Like

Is it not working because of “Redirect rules won’t work for the Password exchange: context.protocol === 'oauth2-password’” source

It seems like the case. But what can we do now? Based on email, we need to generate an ID that in turn, is stored to user on signUp. Any advice?