Skip to content
This repository was archived by the owner on Dec 13, 2018. It is now read-only.
This repository was archived by the owner on Dec 13, 2018. It is now read-only.

User creation could use some TLC #628

Description

@mdeggies

"Our application creates users programmatically and I was creating users like so:

const spApplication = req.app.get('stormpathApplication');
spApplication.createAccount(acct);

With some debugging, that method doesn’t correctly create a user fully. It was missing some fields like the “recovery_question” and answer.
I did some digging around in the source code of express-stormpath and found this:

oktaUser.credentials.recovery_question = {

oktaUser.profile.emailVerificationStatus = 'UNVERIFIED';
oktaUser.profile.emailVerificationToken = uuid.v4();
oktaUser.profile.stormpathMigrationRecoveryAnswer = uuid.v4();
oktaUser.credentials.recovery_question = {
question: 'stormpathMigrationRecoveryAnswer',
answer: oktaUser.profile.stormpathMigrationRecoveryAnswer
};

So I finally had to create a user manually using the okta node sdk.

Without these fields, the reset password would fail silently."

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions