Does the cancellation prompt apply to one user or all users of the app?

93 Views Asked by At

The docs say that:

It's important to implement your own rate limiting of One Tap sign-in prompts. If you don't, and a user cancels several prompts in a row, the One Tap client will not prompt the user for the next 24 hours.

class YourActivity : AppCompatActivity() {
    private val REQ_ONE_TAP = 2  // Can be any integer unique to the Activity
    private var showOneTapUI = true

    override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
        super.onActivityResult(requestCode, resultCode, data)
        when (requestCode) {
            REQ_ONE_TAP -> {
                try {
                    // ...
                } catch (e: ApiException) {
                    when (e.statusCode) {
                        CommonStatusCodes.CANCELED -> {
                            Log.d(TAG, "One-tap dialog was closed.")
                            // Don't re-prompt the user.
                            showOneTapUI = false
                        }
                        CommonStatusCodes.NETWORK_ERROR -> Log.d(TAG, "Network Error")
                        else -> Log.d(TAG, "Error")
                    }
                }
            }
        }
    }
}

Is this available for each user separately? So if I have 5 users, and only one cancels the prompt several times, is this available only for that user, or for all users of the app?

1

There are 1 best solutions below

1
On

If one user cancels prompts multiple times on their device, it won't affect other users on different devices using the same app.