Notice
Pay attention, after user logged in app, the app.auth.user
object will be set.
The authentication is for after user object synced with CloadIO and the app.auth.user
will be set.
Pay attention, after user logged in app, the app.auth.user
object will be set.
After user object synced with CloadIO, actually user authentication was completed and app.auth.onCompleted
event will be run so user can see app.
Type:
Function
app.auth.onCompleted = function () {};
// called when user object synced with cloadio
app.auth.onCompleted = function () {
if (app.auth.user.name)
homePage.show();
};
The app.auth.sms.onReceived
event is called when sms received in app and this event is for handle.
Running sms in the app is when authentication is completed.
Type:
Function
app.auth.sms.onReceived = function (text, sender) {};
The app.auth.sms.onReceived
run after received a sms on FrameworkJS project. It has two parameters, the first is content of sms and the next one is about sender of sms.
Parameters | Type | Description |
---|---|---|
text | String | Contain of message text. |
sender | String | Contain sender of short message. |
// on sms received event
app.auth.sms.onReceived = function (text, sender) {
// show the message and sender every where that need
};