Send google play public key during /purchase/can-do-purchase

This commit is contained in:
Jonas Lochmann
2020-06-08 02:00:00 +02:00
parent 12dc22f8a2
commit 27c3b494da
4 changed files with 11 additions and 5 deletions
+4 -2
View File
@@ -1,6 +1,6 @@
/*
* server component for the TimeLimit App
* Copyright (C) 2019 Jonas Lochmann
* Copyright (C) 2019 - 2020 Jonas Lochmann
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
@@ -17,5 +17,7 @@
export { canDoNextPurchase } from './can-do-next-purchase'
export { requireFamilyEntry } from './require-family-entry'
export { isGooglePlayPurchaseSignatureValid, areGooglePlayPaymentsPossible } from './verification'
export {
isGooglePlayPurchaseSignatureValid, areGooglePlayPaymentsPossible, googlePlayPublicKey
} from './verification'
export { addPurchase } from './add-purchase'
+1 -1
View File
@@ -19,7 +19,7 @@ const IABVerifier: new (publicKey: string) => {
verifyReceipt: (data: string, signature: string) => boolean
} = require('iab_verifier')
const googlePlayPublicKey = process.env.GOOGLE_PLAY_PUBLIC_KEY || ''
export const googlePlayPublicKey = process.env.GOOGLE_PLAY_PUBLIC_KEY || ''
const verifier = new IABVerifier(googlePlayPublicKey)