loginGoogle

Apperyio.User.loginGoogle(webApplicationClientId, [callbackUrl], [dbId])

Logging in via Google. Returns a Promise.

Parameters

This function has the following parameters:

ArgumentsDescription
webApplicationClientIdGoogle client id, type "Web application" on Google console. Read more.
callbackUrlURL for redirecting after a user grants access. Used for login on preview only.
dbIdDatabase API key. Optional if a default database id is set.
Example

Logging in via Google.

this.Apperyio.user.loginGoogle("Google Client Id", "https://appery.io/app/view/<YOUR APPERY.IO APP ID>/assets/static/social_login.html", "<Your Database Api Key>").then(function(token){
   alert("success_" + token);
},function(error) {
   alert("error_" + JSON.stringify(error));
});
Apperyio.User.loginGoogle("Google Client Id", "https://appery.io/app/view/<YOUR-APPERY-IO-APP-ID>/", "<Your Database Api Key>").then(function(token){
   alert("success_" + token);
},function(error) {
   alert("error_" + JSON.stringify(error));
});
Apperyio.User.loginGoogle("Google Client Id", "https://appery.io/app/view/<YOUR-APPERY-IO-APP-ID>/<Your_Login_Screen_Name>", "<Your Database Api Key>").then(function(token){
   alert("success_" + token);
},function(error) {
   alert("error_" + JSON.stringify(error));
});