1.0.20220806 • Published 2 years ago

@maxim_mazurok/gapi.client.firebaseappcheck v1.0.20220806

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

TypeScript typings for Firebase App Check API v1

Firebase App Check works alongside other Firebase services to help protect your backend resources from abuse, such as billing fraud or phishing. For detailed description please check documentation.

Installing

Install typings for Firebase App Check API:

npm install @types/gapi.client.firebaseappcheck@v1 --save-dev

Usage

You need to initialize Google API client in your code:

gapi.load('client', () => {
  // now we can use gapi.client
  // ...
});

Then load api client wrapper:

gapi.client.load('firebaseappcheck', 'v1', () => {
  // now we can use gapi.client.firebaseappcheck
  // ...
});

Don't forget to authenticate your client before sending any request to resources:

// declare client_id registered in Google Developers Console
var client_id = '',
  scope = [ 
      // See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.
      'https://www.googleapis.com/auth/cloud-platform',

      // View and administer all your Firebase data and settings
      'https://www.googleapis.com/auth/firebase',
    ],
    immediate = true;
// ...

gapi.auth.authorize(
  { client_id: client_id, scope: scope, immediate: immediate },
  authResult => {
    if (authResult && !authResult.error) {
        /* handle successful authorization */
    } else {
        /* handle authorization error */
    }
});

After that you can use Firebase App Check API resources:

/*
Returns a public JWK set as specified by [RFC 7517](https://tools.ietf.org/html/rfc7517) that can be used to verify App Check tokens. Exactly one of the public keys in the returned set will successfully validate any App Check token that is currently valid.
*/
await gapi.client.firebaseappcheck.jwks.get({ name: "name",  });
1.0.20220715

2 years ago

1.0.20220615

2 years ago

1.0.20220620

2 years ago

1.0.20220806

2 years ago

1.0.20220625

2 years ago

1.0.20220725

2 years ago

1.0.20220708

2 years ago

1.0.20220730

2 years ago

1.0.20220513

2 years ago

1.0.20220522

2 years ago

1.0.20220429

2 years ago

1.0.20220604

2 years ago

1.0.20220530

2 years ago

1.0.20220318

2 years ago

1.0.20220415

2 years ago

1.0.20220325

2 years ago

1.0.20220408

2 years ago

1.0.20220425

2 years ago

1.0.20220404

2 years ago

1.0.20220225

2 years ago

1.0.20220303

2 years ago

1.0.20220311

2 years ago

1.0.20220218

2 years ago

1.0.20220128

2 years ago

1.0.20220106

2 years ago

1.0.20220204

2 years ago

1.0.20220116

2 years ago

1.0.20220211

2 years ago

1.0.20220121

2 years ago

1.0.20211130

2 years ago

1.0.20211214

2 years ago

1.0.20211203

2 years ago

1.0.20211112

3 years ago

1.0.20211029

3 years ago

1.0.20211022

3 years ago

1.0.20211015

3 years ago

1.0.20211001

3 years ago

1.0.20210924

3 years ago

1.0.20210917

3 years ago

1.0.20210910

3 years ago

1.0.20210827

3 years ago