Activation Emails - Not Found

When creating a new user with the Java SDK, I create the user with no password.

UserBuilder builder = UserBuilder.instance();
builder
  .setEmail(user.getEmail())
  .setFirstName(user.getFirstName())
  .setLastName(user.getLastName())
  .setActive(true);

com.okta.sdk.resource.user.User oktaUser = builder.buildAndCreate(okta);
// user created successfully

EDIT

The activation email does not work in Safari. I copied and pasted it into Chrome and it worked. So what is wrong with activation emails in Safari?


Original

This user shows up in the Admin console with a status of Password reset. The activation email is sent to the newly created account, but the activation link does not work. It always generates a 404 error page in Okta.
This link https://dev-315558.oktapreview.com/welcome/Ehh_pjzcccqVB0aihKIj does not work.

So what am I missing then? If I .setActive(false) then the user never gets an activation email.

This was a bit of a misunderstanding on my part. The links did not work because I may have cookies or some session information still left over from another account session. I didn’t have that in Chrome for my first activation attempt.

However, after that Chrome started doing the same thing, which is how I found out it was some cookie/session data.

I opened an incognito window for both browsers and the link works as expected.

It is a bit weird that session data interferes with those links. A security-related filter I imagine, but it’s frustrating during development that I can’t just click the link without opening in private/incognito mode.