Create you first user

In this step we are going to register your first user

You can register from dashboard https://feathersjs-mongoose-casl-admin.herokuapp.com/ swagger http://localhost:3030/docs postman

Run in Postman

Run your server

npm run dev

Create user

POST http://localhost:3030/users

Request Body

Name
Type
Description

password

string

password1234

email

string

MyEmail@gmail.com

{
createdAt: "2019-03-07T08:52:32.429Z"
email: "MyEmail@gmail.com"
isVerified: false
roles: []
updatedAt: "2019-03-07T08:52:32.429Z"
verifiedRequired: true
__v: 0
_id: "5c80dbd0e3c6b10ad0375457"
}

Postman snippet

curl -X POST \
  http://localhost:3030/users \
  -H 'Content-Type: application/json' \
  -H 'Postman-Token: 5ad6571f-e2dd-4737-b0e5-73d2fe8986fe' \
  -H 'cache-control: no-cache' \
  -d '{
	"email": "yourEmail@gmail.com",
	"password": "password"
}'

Response

{
    "roles": [],
    "_id": "5c84204c1fa2991670286a70",
    "email": "doron.nahum@gmail.com",
    "isVerified": false,
    "updatedAt": "2019-03-09T20:21:32.784Z",
    "createdAt": "2019-03-09T20:21:32.784Z",
    "__v": 0,
    "verifiedRequired": true
}

verifiedRequired is true, you can't login to app yet, if you try to login the server will return error with message: "User's email is not yet verified."

You can try to login to dashboard:

Didn't receive any email?

Want to resend the email?

Postman snippet

curl -X POST \
  http://localhost:3030/authManagement \
  -H 'Content-Type: application/json' \
  -H 'Postman-Token: 6f647968-5e41-45a1-8b82-d8ad42dabcda' \
  -H 'cache-control: no-cache' \
  -d '{
   "action": "resendVerifySignup",
   "value": {"email": "YOUR_EMAIL@Gmail.com"}
}'

Last updated

Was this helpful?