Platform SignIn is a SignIn mechanism that uses Sign In With Apple on iOS and Google SignIn on Android. There is two API added, PlatformSignIn as trigger action and FuseJS/Auth as javascript module.
This module does not provide UI elements of Platform Sign In. (Visual button of Sign In With Apple or Google Sign In Button). Users must design the Sign In Button itself that complies with design guidelines on both platform
For more information on what are the pre-request when implementing Sign In With Apple or Google 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.
Example
The following example shows how to use it:
<App>
<JavaScript>
var Auth = require('FuseJS/Auth');
var signInHandler = function(result) {
console.dir(result);
// result is json object containing these properties :
// email -> user email that has been sign in / sign up
// firstName -> User firstname
// lastName -> User Lastname
// userId -> User uniqe Id
}
function doSignIn() {
Auth.signIn().then(signInHandler);
}
Auth.hasSignedIn().then(function (result) {
if (result) {
// user has already sign in
}
});
module.exports = {
doSignIn
}
</JavaScript>
<StackPanel>
<Button Text="Sign In">
<Clicked>
<Callback Handler="{doSignIn}" />
</Clicked>
</Button>
<Button Text="Sign In Using Trigger Action">
<Clicked>
<PlatformSignIn Handler="{signInHandler}" />
</Clicked>
</Button>
</StackPanel>
</App
Platform SignIn is a SignIn mechanism that uses
Sign In With Apple
on iOS andGoogle SignIn
on Android. There is two API added,PlatformSignIn
as trigger action andFuseJS/Auth
as javascript module.This module does not provide UI elements of Platform Sign In. (Visual button of Sign In With Apple or Google Sign In Button). Users must design the Sign In Button itself that complies with design guidelines on both platform
Example
The following example shows how to use it:
This PR contains: