1

I have firebase project connected to android app, and I am using App check (SafetyNet), and it work 100% well.

Also I am using admins SDK (java) to connect and do action in the project. before using the App check every thing was working 100% well, but after enabling app check I can't access and all action fail.

so how to deal with admin SDK and app check ?

   FirebaseOptions options = new FirebaseOptions.Builder().setCredentials(GoogleCredentials.fromStream(
            new ClassPathResource("/myproject-firebase-adminsdk.json").getInputStream()))
            .setDatabaseUrl("https://myproject-default-rtdb.firebaseio.com").build();

    if (FirebaseApp.getApps().isEmpty()) {
        FirebaseApp.initializeApp(options);
    }

DatabaseReference ref2 = FirebaseDatabase.getInstance().getReference("/users");
     ref2.addListenerForSingleValueEvent(new ValueEventListener() {
        @Override
          public void onDataChange(DataSnapshot dataSnapshot) {
            Object document = dataSnapshot.getValue();
            System.out.println(document);
    }

    @Override
    public void onCancelled(DatabaseError error) {
        System.out.println(error);

    }
});

App check

MehdiS
  • 89
  • 5
  • 1
    @FrankvanPuffelen sir I have added the code and App Check screenshot. the problem is technical, because app check use SHA-256 to verify queries – MehdiS Jul 27 '22 at 10:25

1 Answers1

1

Firebaser here

Apologies for the inconvenience and thank you for reporting this issue -- this is similar to a previously reported issue we've seen on Admin Node.js SDK, and we are working on releasing the fix. Please follow the GitHub thread for updates.