Auth0 Home Blog Docs

ByPass MFA with IP address



Hi. I have a javascript application with embedded Lock deployed on the server with IP I want to create a rule which will check the ip address and bypass MFA with some certain IP.

In the Rule I get the IP address in the context object (context.request.ip). But when I check log the context.request.ip give me some strange ip not the “”.

Could you please advise how can I get the IP of my application using embedded Lock in RULE?


:wave: @it4

Can you please confirm if I understood correctly, are you wanting to allow only users with a certain IP address to access your application? You could use the IP Address Whitelist Rule. If you are using the Try this rule button, you’ll need to edit the context in line 11, "ip": "X.X.X.X", to match the IP you whitelisted to see a successful try.

Please let me know if I misunderstood and if you able to share the Rule you are creating?