1

I sometimes need other people to log into a scratch org to to some QA/testing, so I want to create a new user for the scratch org, or at least generate a password for the default scratch org user. I've created a user with with the sfdx force:user:password:generate command, but whenever i try to login in with that user SF want's to verify the account by sending a code to my email. And the problem is that it does this everytime it's a "new" browser.

This makes it a bit problematic to send that username/password to people on my team since the code comes to my email. The username/password should ideally be able to be shared with multiple team members.

Is there a way to disable this verification step on scratch org users?

1 Answer 1

1

You can do that by setting Trusted IP Ranges for Your Organisation.

From the documentation - Trusted IP Ranges define a list of IP addresses from which users can log in without receiving a login challenge for verification of their identity, such as a code sent to their mobile phone.

From Setup, enter Network Access in the Quick Find box, then select Network Access. Click New. Enter a valid IP address in the Start IP Address field and a higher IP address in the End IP Address field. The start and end addresses define the range of allowable IP addresses from which users can log in, including the start and end values. If you want to allow logins from a single IP address, enter the same address in both fields.

Click Save.

Example below enter image description here

3
  • While your answer is correct, your example is not possible. It only allows you to do one "150.0.0.0 -> 150.255.255.255" range, not "0.0.0.0 -> 255.255.255.255". Thank you for the help btw. Would love a setting though, which I can set in my scratch org definition file Commented Dec 18, 2017 at 10:15
  • For automated testing, how can I automate this process?
    – Eddie
    Commented Jun 14, 2018 at 13:53
  • @espenhogbakk I tried 150.255.255.255 but it throws error. The range specified is too large
    – Rafee
    Commented Mar 22, 2021 at 2:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .