DF 2.7.0: User register API don't save password

rest

#1

Hello,

I try some scenarios to test the “/user/register” API, and can’t get to save the password!

In the DF configuration have: Allow Open Registration = true.

Then, using the swagger included in DF I try to register a user with password, have this:

body:
{
  "email": "dev9a@mailinator.com",
  "first_name": "dev9a",
  "last_name": "test",
  "display_name": "Dev9a Name",
  "new_password": "soudev9a",
  "code": "onlytotest"
}

login: true

The cUrl:
http://my.domain.com/api/v2/user/register?login=true

Response:
{
“success”: true,
“confirmation_required”: true
}

In the database the password is not set, receive an email with the Url to set the password and confirm the account!

Ok, now try the same but with changing the “login: false” and get:

The cUrl:
http://my.domain.com/api/v2/user/register?login=false

Response:
{
“success”: true
}
Same result without the “code” in the body!

No way to set the user password using the API.

Can you confirm if it is a Bug or other issue?

Regards,
LB


#2

Hello,

I put same question in Github, DreamFactory repository, and get answer from Todd Appleton (dreamfactory dev) and get this answer:

Github Dreamfactory post

The UI is a little confusing. There’s an implicit assumption that if you don’t want to require email confirmation you should unset ‘Open Reg Email Service’ in Services–>User–>Config. Set it to empty (no selection). Your first example with login=true should then return a session token.

I tested and works fine.

Best regards,
LB