Search code examples
google-oauthgoogle-fit

Users seeing the Unverified App Screen in the android app


We have android application that uses Fitness API for reading steps.

Our app has passed OAuth verification process and ./auth/fitness.activity.read scope was approved: enter image description here

In the app we request "fitness read" permission using this part of the code:

val fitnessOptions = FitnessOptions.builder()
        .addDataType(DataType.TYPE_STEP_COUNT_DELTA, FitnessOptions.ACCESS_READ)
        .build()
    GoogleSignIn.requestPermissions(
        this,
        1000,
        GoogleSignIn.getAccountForExtension(requireContext(), fitnessOptions),
        fitnessOptions
    )

But unverified OAuth consent screen still appears:

GCP Technical Support didn't help with it and asked us to report this problem here.

Any ideas what's wrong? Maybe someone had similar issue?


Solution

  • The problem was in OAuth Client ID. We had 2 projects in Google Cloud Console: for prod and for dev. OAuth consent screen was verified for prod one.

    Prod and dev projects had Client IDs for the same package name and certificate and my prod app has used Client ID of the dev project.