Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@firebase/app-check-types

Package Overview
Dependencies
Maintainers
5
Versions
1228
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@firebase/app-check-types - npm Package Compare versions

Comparing version 0.1.0 to 0.2.0-20216122160

13

CHANGELOG.md
# @firebase/app-check-types
## 0.1.0
## 0.2.0-20216122160
### Minor Changes
- [`870dd5e35`](https://github.com/firebase/firebase-js-sdk/commit/870dd5e3594f5b588bdc2801c60c6d984d1d08cc) [#5033](https://github.com/firebase/firebase-js-sdk/pull/5033) - Added `getToken()` and `onTokenChanged` methods to App Check.
### Patch Changes
- [`81c131abe`](https://github.com/firebase/firebase-js-sdk/commit/81c131abea7001c5933156ff6b0f3925f16ff052) [#4860](https://github.com/firebase/firebase-js-sdk/pull/4860) - Release the Firebase App Check package.
- [`5d007b8fb`](https://github.com/firebase/firebase-js-sdk/commit/5d007b8fb64ac26c2f82704398965e9f3deda58a) [#5084](https://github.com/firebase/firebase-js-sdk/pull/5084) - Fixed so token listeners added through public API call the error handler while internal token listeners return the error as a token field.
## 0.1.0
### Minor Changes
- [`81c131abe`](https://github.com/firebase/firebase-js-sdk/commit/81c131abea7001c5933156ff6b0f3925f16ff052) [#4860](https://github.com/firebase/firebase-js-sdk/pull/4860) - Release the Firebase App Check package.

@@ -18,3 +18,9 @@ /**

import { PartialObserver, Unsubscribe } from '@firebase/util';
import { FirebaseApp } from '@firebase/app-types';
export interface FirebaseAppCheck {
/** The `FirebaseApp` associated with this instance. */
app: FirebaseApp;
/**

@@ -40,2 +46,36 @@ * Activate AppCheck

setTokenAutoRefreshEnabled(isTokenAutoRefreshEnabled: boolean): void;
/**
* Get the current App Check token. Attaches to the most recent
* in-flight request if one is present. Returns null if no token
* is present and no token requests are in flight.
*
* @param forceRefresh - If true, will always try to fetch a fresh token.
* If false, will use a cached token if found in storage.
*/
getToken(forceRefresh?: boolean): Promise<AppCheckTokenResult>;
/**
* Registers a listener to changes in the token state. There can be more
* than one listener registered at the same time for one or more
* App Check instances. The listeners call back on the UI thread whenever
* the current token associated with this App Check instance changes.
*
* @returns A function that unsubscribes this listener.
*/
onTokenChanged(observer: PartialObserver<AppCheckTokenResult>): Unsubscribe;
/**
* Registers a listener to changes in the token state. There can be more
* than one listener registered at the same time for one or more
* App Check instances. The listeners call back on the UI thread whenever
* the current token associated with this App Check instance changes.
*
* @returns A function that unsubscribes this listener.
*/
onTokenChanged(
onNext: (tokenResult: AppCheckTokenResult) => void,
onError?: (error: Error) => void,
onCompletion?: () => void
): Unsubscribe;
}

@@ -69,2 +109,12 @@

/**
* Result returned by `getToken()`.
*/
interface AppCheckTokenResult {
/**
* The token string in JWT format.
*/
readonly token: string;
}
export type AppCheckComponentName = 'appCheck';

@@ -71,0 +121,0 @@ declare module '@firebase/component' {

2

package.json
{
"name": "@firebase/app-check-types",
"version": "0.1.0",
"version": "0.2.0-20216122160",
"description": "@firebase/app-check Types",

@@ -5,0 +5,0 @@ "author": "Firebase <firebase-support@google.com> (https://firebase.google.com/)",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc