diff --git a/lib/methods/handle-callback.js b/lib/methods/handle-callback.js index 3cf33b0..cdf0c7e 100644 --- a/lib/methods/handle-callback.js +++ b/lib/methods/handle-callback.js @@ -30,6 +30,7 @@ const handleCallback = client => { // insert application with respective authentication data if (collRef) { + const firestoreTimestamp = admin.firestore.Timestamp.fromDate(new Date()) firestoreDoc = { application_id: application._id, application_app_id: application.app_id, @@ -37,8 +38,8 @@ const handleCallback = client => { authentication_id: authenticationId, authentication_permissions: JSON.stringify(authentication.permissions), store_id: storeId, - created_at: admin.firestore.Timestamp.fromDate(new Date()), - updated_at: null + created_at: firestoreTimestamp, + updated_at: firestoreTimestamp } } else { values = [