FCM Registration
#
OverviewThis document describes how to configure the push notification feature in the GCCS authentication process.
#
Feature DescriptionThere can be circumstances when the user requests GCCS authentication from a non-mobile platform such as the web or window.
To receive the push notification in the mobile app that has implemented the iOS SDK, FCM registration and the token update is necessary.
#
FCM Server keyIn order to receive the push notifications, the server key generated by Firebase Cloud Messaging (FCM) must be sent together with the client issuance request. The FCM server key can be found in the process below.
- Create or load the project in the Firebase Console.
- [Project Settings] > get the Server Key from [Cloud Messaging] menu.
If the client needs registration, note that the FCM server key is indispensable.
#
FCM Push notification token registrationFCM push token should be registered so that it can be used for notifying authentication request.
By using the requestTokenUpdate()
from GuardianSdk
, the FCM push token that was generated from the iOS device can be called to be registered and updated.
FCM push token can be changed due to expiration, etc. It should be updated by calling requestTokenUpdate()
.
#
ParameterKey | Value | Description |
---|---|---|
token | String | FCM push notification token |
#
Example// FCM Push notification token registeredGuardianService.sharedInstance.requestTokenUpdate(token: fcmToken!) { rtCode, rtMsg in ... } onFailed: { errCode, errMsg in ... }
#
TokenResponseKey | Value | Description |
---|---|---|
rtCode | 0 | Result code |
rtMsg | String | Result message |
If the API call to register FCM push token is successful, the rtCode
will be 0
#
ErrorResultKey | Value | Description |
---|---|---|
errorCode | Int | Error code |
errorMessage | String | Error message |
If API call fails, the user will receive an errorCode