# Instructions to upgrade to Cordova plugin version to 4.0

This chapter describes the steps to take in order to migrate from Cordova plugin 3.0 to 4.0.

## Mobile authentication

The mobile authentication configuration for the Android platform has changed. We switched from Google Cloud Messaging (GCM) to Firebase Cloud Messaging (FCM). In order to enable push mobile authentication for the Android platform in your project you must perform the steps described in the paragraphs below.

### Import your GCM project as a Firebase project

You must make sure that your Google project is imported into FCM:

1. Go to [Firebase Console](https://console.firebase.google.com).
2. Follow the instructions described in [Import your GCM project as a Firebase project section of the GCM to FCM migration guide](https://developers.google.com/cloud-messaging/android/android-migrate-fcm#import_your_gcm_project_as_a_firebase_project).

### Remove the GCM sender id property

Due to the migration to FCM, the GCM Sender Id property (`OneginiGcmSenderId`) is no longer used and should be removed from your `config.xml`.

### Follow the setup instructions for FCM

In addition to importing your project into the FCM console you must also configure FCM in your Cordova project. See the [push mobile authentication topic guide](../topics/mobile-authentication-push.md#setup-and-requirements) for further instructions.

### Reauthentication
The `onegini.user.reauthenticate` function has been removed. You can still simulate this behaviour by explicitly logging the user out (`onegini.user.logout()`)
and and then authenticate again (`onegini.user.authenticate`)
```

# Instructions to upgrade to Cordova plugin version to 4.0

This chapter describes the steps to take in order to migrate from Cordova plugin 3.0 to 4.0.

## Mobile authentication

The mobile authentication configuration for the Android platform has changed. We switched from Google Cloud Messaging (GCM) to Firebase Cloud Messaging (FCM). In order to enable push mobile authentication for the Android platform in your project you must perform the steps described in the paragraphs below.

### Import your GCM project as a Firebase project

You must make sure that your Google project is imported into FCM:

1. Go to [Firebase Console](https://console.firebase.google.com).
2. Follow the instructions described in [Import your GCM project as a Firebase project section of the GCM to FCM migration guide](https://developers.google.com/cloud-messaging/android/android-migrate-fcm#import_your_gcm_project_as_a_firebase_project).

### Remove the GCM sender id property

Due to the migration to FCM, the GCM Sender Id property (`OneginiGcmSenderId`) is no longer used and should be removed from your `config.xml`.

### Follow the setup instructions for FCM

In addition to importing your project into the FCM console you must also configure FCM in your Cordova project. See the [push mobile authentication topic guide](../topics/mobile-authentication-push.md#setup-and-requirements) for further instructions.

Revert "CORDOPLUG-253 Update upgrade instructions"
Revert "CORDOPLUG-253 Update upgrade instructions"

This reverts commit f3ee2e4dd0a8a9e8d37839e2cb41a52668aad6a3.
