capacitor-community / proposals

Plugin and platform requests ✋
75 stars 2 forks source link

Firebase AppCheck #133

Open mattmilan-dev opened 3 years ago

mattmilan-dev commented 3 years ago

Plugin Request

Name: Firebase AppCheck Package: @capacitor-community/firebase-appcheck

Platform(s)

iOS, Android, Web [Currently not supported in my plugin]

Existing Solutions

I have just finished creating a custom plugin to perform this functionality and have it working in both an Android and iOS environment. Web is still to be added. Available here: https://github.com/mattmilan-dev/capacitor-firebase-appcheck

Description

Earlier this year Firebase announced a new beta feature called AppCheck, which utilises native API's (AppAttest, DeviceCheck, Recaptcha V3 and SafetyNet) to ensure that resources are only requested by the application that is supposed to. This can help prevent billing fraud as well as numerous other problems that can hit all sizes of applications.

This plugin interfaces with the native API's and grabs the AppCheck token using the new Protect non-Firebase resources feature announced a few days ago, allowing the hybrid app to attach the correct token as a custom provider within the hybrid app, therefore protecting all your resouces without having to make calls in the native code.

I have been learning as I go along with this plugin, and therefore i'm sure it can be improves, therefore making me happy to present this plugin to as wide of an audience as possible.

riderx commented 2 years ago

@mattmilan-dev i added your plugin to awesome-capacitor if that is useful please take time to start the repo as well :)

mattmilan-dev commented 2 years ago

Hey @riderx, Great idea! Thanks for adding my repo to your list!