Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: AppCheck support #177

Closed
jjgriff93 opened this issue Aug 15, 2022 · 5 comments · Fixed by #239
Closed

feat: AppCheck support #177

jjgriff93 opened this issue Aug 15, 2022 · 5 comments · Fixed by #239

Comments

@jjgriff93
Copy link

Is your feature request related to a problem? Please describe:
Loving this library thus far. It would be incredibly useful to have a--check support in this library (there's only one capacitor alternative currently and that isn't being maintained and isn't compatible with Cap 4: https://github.com/mattmilan-dev/capacitor-firebase-appcheck

Describe the solution you'd like:
Similarly to the linked library, I would like to be able to access native firebase appcheck along with the tokens it issues from within my Capacitor application. I currently use AngularFire and when initialising appcheck on the web layer I access the native token as a CustomProvider during module bootstrapping:

// Initialise AppCheck natively if running on iOS or Android
      if (Capacitor.isNativePlatform()) {
        AppCheck.initialize({ debug: isDevMode() });
        // Use CustomProvider to get native AppCheck token
        provider = new CustomProvider({
          getToken: async () => {
            const { token, exp: expireTimeMillis } =
              await AppCheck.getAppCheckToken();
            return { token, expireTimeMillis };
          }
        });
        // Or use ReCAPTCHAv3 if running in web
      } else {

Thanks! Goes without saying that I'm happy to help implement or provide further info

@robingenz
Copy link
Member

Great feature request! This plugin is still missing.

Thanks! Goes without saying that I'm happy to help implement or provide further info

If you want, you can do the implementation. I would then create the boilerplate code for the new package and prepare everything.
Just let me know.

@phoheisel
Copy link

I would love to see that! Is there any other known way to get app check running witch cap4?

@robingenz
Copy link
Member

I am currently not aware of any. The plugin is still planned but I currently have little free time.

@jjgriff93 jjgriff93 mentioned this issue Nov 4, 2022
2 tasks
@jjgriff93
Copy link
Author

jjgriff93 commented Nov 4, 2022

Hello guys, sorry for the delay but I have put together an implementation for this and opened a PR (#237), let me know what you think (and please test it)! @robingenz

@robingenz robingenz added this to the v1.3.0 milestone Nov 4, 2022
@robingenz
Copy link
Member

A first dev version is now available for testing:

npm i @capacitor-firebase/app-check@1.2.0-dev.c2371d8.1667689388

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
3 participants