Firebase. AppCheck. FirebaseAppCheck
Firebase App Check object.
Summary
App Check helps protect your API resources from abuse by preventing unauthorized clients from accessing your backend resources.
With App Check, devices running your app will use an AppCheckProvider that attests to one or both of the following:
- Requests originate from your authentic app
- Requests originate from an authentic, untampered device
Properties | |
|---|---|
DefaultInstance | staticFirebaseAppCheckGets the instance ofFirebaseAppCheck associated with the defaultFirebaseApp instance. |
TokenChanged | EventHandler<TokenChangedEventArgs > |
Public static functions | |
|---|---|
GetInstance(FirebaseApp app) | Gets the instance ofFirebaseAppCheck associated with the givenFirebaseApp instance. |
SetAppCheckProviderFactory(IAppCheckProviderFactory factory) | voidInstalls the givenIAppCheckProviderFactory, overwriting any that were previously associated with thisFirebaseAppCheck instance. |
Public functions | |
|---|---|
GetAppCheckTokenAsync(bool forceRefresh) | System.Threading.Tasks.Task<AppCheckToken > |
SetTokenAutoRefreshEnabled(bool isTokenAutoRefreshEnabled) | voidSets the {. |
Properties
DefaultInstance
staticFirebaseAppCheckDefaultInstance
Gets the instance ofFirebaseAppCheck associated with the defaultFirebaseApp instance.
TokenChanged
EventHandler<TokenChangedEventArgs>TokenChanged
Public static functions
GetInstance
FirebaseAppCheckGetInstance(FirebaseAppapp)
Gets the instance ofFirebaseAppCheck associated with the givenFirebaseApp instance.
SetAppCheckProviderFactory
voidSetAppCheckProviderFactory(IAppCheckProviderFactoryfactory)
Installs the givenIAppCheckProviderFactory, overwriting any that were previously associated with thisFirebaseAppCheck instance.
Automatic token refreshing will only occur if the global isDataCollectionDefaultEnabled flag is set to true. To allow automatic token refreshing forFirebase App Check without changing the isDataCollectionDefaultEnabled flag for otherFirebase SDKs, callSetTokenAutoRefreshEnabled(bool) after installing the factory.
This method should be called before initializing theFirebase App.
Public functions
GetAppCheckTokenAsync
System.Threading.Tasks.Task<AppCheckToken>GetAppCheckTokenAsync(boolforceRefresh)
SetTokenAutoRefreshEnabled
voidSetTokenAutoRefreshEnabled(boolisTokenAutoRefreshEnabled)
Sets the {.
isTokenAutoRefreshEnabled}flag.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-08-07 UTC.