Handler : SignInEventHandler (object, SignInArgs) ux
Optionally specifies a handler that will be called when this trigger is pulsed.
This is trigger action for taking Platform SignIn. Platform SignIn is a SignIn mechanism that use Sign In With Apple
on iOS and Google SignIn
on Android.
Platform SignIn is only available on the mobile target platform (iOS and Android).
You need to add a reference to "Fuse.Auth"
in your project file to use this feature.
For more information on what are the pre-request when implementing
Sign In With Apple
orGoogle Sign In
, you can check the documentation on the apple developer website or android developer website for iOS add "SystemCapabilities": { "SignInWithApple":true } in the unoproj file.
The following example shows how to use it:
```XML
<App>
<JavaScript>
var Observable = require('FuseJS/Observable');
var status = Observable();
var statusMessage = Observable();
module.exports = {
resultHandler: function(result) {
console.dir(result);
// result is json object containing these properties :
// status -> boolean value indicating whether sign in action success or fail
// email -> user email that has been sign in / sign up
// firstName -> User firstname
// lastName -> User Lastname
// userId -> User uniqe Id
}
}
</JavaScript>
<Button Text="Sign In">
<Clicked>
<PlatformSignIn Handler="{resultHandler}" />
</Clicked>
</Button>
</App
```
When the callback handler is fired for the first time and the result object of
status
property is true, save those logged user information immediately to the server especially on iOS, because as stated in the documentation on the apple website, the Sign In With Apple will only send userId informataion the next time user do the authentication again
Optionally specifies a handler that will be called when this trigger is pulsed.
Creates a new PlatformSignIn
The number of seconds after the start of the trigger that the action should be performed.
hide
hide
hide