How to validate user after a findOne method of another model

19 views
Skip to first unread message

Nafis Hasnian

unread,
Apr 22, 2017, 3:24:05 PM4/22/17
to LoopbackJS
My email Authentication is almost like this example

I just want to check the user's school and @school.edu email in my School model  
(which is given below) if it matches then it registers a user and sends email varification.

{
"name": "schools",
"base": "PersistedModel",
"idInjection": true,
"options": {
"validateUpsert": true
},
"properties": {
"School": {
"type": "string"
},
"Email": {
"type": "string",
"required": true
}
},
"validations": [],
"relations": {},
"acls": [],
"methods": {}
}

Reply all
Reply to author
Forward
0 new messages