Skip to content
Mahgoub

A Software Developer who does not let his schooling interfere with his education

Mahgoub

A Software Developer who does not let his schooling interfere with his education

Ionic 2 + Parse Server: Login with Google Plus

mmahgoub, June 20, 2017September 4, 2023

I am working on a hybrid mobile app using Ionic and Parse Server as a back-end and for the past three days I’ve been trying to implement Google login with the native Google Plus plugin. It was a rough ride!

Error 10

“The application is misconfigured. This error is not recoverable and will be treated as fatal. The developer should look at the logs after this to determine more actionable information.” –Google Common API Documentation
 
If you are facing error 10 with the native Google Plus plugin you should check your certificate’s configuration and make sure your APK is signed. In my case I was using Ionic cloud service to build my project, for some strange reason the downloaded APK from Ionic wasn’t signed. I had to build and sign my project locally using `ionic cordova build android` command, I was still having the same problem (Unable to sign the APK)! Then I had to change keystore password to a new one, the old password had special characters and I am not quite sure if this was the problem.

Parse Server

After I get rid of error 10 I needed to enable social login using Google in Parse Server. However, The documentation is really lacking in the regard, they show you how to login using Facebook and Twitter but no instructions whatsoever about Google. Although Google login is enabled by default in Parse.

In Ionic and after you get the payload from Google Plus plugin you will need to create a new object with the following format:

let authData;
this.googlePlus.login({}).then( res => {
  authData = { authData:{id: res.userId, access_token:res.accessToken,id_token: res.idToken}};
  let user = new this.Parse.User();
  return user._linkWith('google', authData);
});

Then in the back-end Parse Server should be able to pass authData to Google API to make sure they are valid.

Blog

Post navigation

Previous post
Next post

Related Posts

Tip: Parsing doubles and integers in Dart

October 18, 2023February 20, 2024

In order to gracefully handle potential exceptions when parsing a string into a double, one effective technique is to prepend a "0" to the input string before performing the conversion. By employing this approach, the default value becomes zero, ensuring that no exceptions are raised even when the input is…

Read More
Blog

Volkswagen If this is real I will sell my soul and buy it

September 4, 2023February 20, 2024

Volkswagen has just pulled the covers off their latest creation – the Volkswagen ID.GTI, and oh my goodness, it’s absolutely sizzling! While details about the car’s size and dimensions are still under wraps, it’s safe to assume that this could be the electric counterpart to the beloved Polo GTI. If…

Read More
Blog Software Developer path diagram

Embarking on My Cloud Certification Journey

October 9, 2023February 20, 2024

Today I am marking the start of my journey towards AWS cloud certification. With determination and enthusiasm, I’m ready to explore cloud computing. My first goal is to conquer the AWS Cloud Practitioner certification, a milestone many say takes three months of dedicated study. However, I’m setting my sights on…

Read More
©2026 Mahgoub | WordPress Theme by SuperbThemes