You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

fetch-with-fire

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fetch-with-fire

Extends browsers' "fetch" API with firebase auth built in

1.5.2
latest
Source
npmnpm
Version published
Weekly downloads
2
100%
Maintainers
1
Weekly downloads
 
Created
Source

DEPRECATED

fetch-with-fire library is fully deprecated. No new changes are expected to land. In fact, none have landed for some time.
This is deprecated because simpler-fetch turned out to be a much better alternative and can do exactly what this library intends to achieve too, which is to make it easier to work with firebase auth. See this documentation on using simpler-fetch with firebase auth to migrate!

fetch-with-fire

Fetch module that extends the browsers' fetch method to interact with backend with firebase auth tokens.
Your project is assumed to be using firebase auth as the stateless auth system.

Note that this is essentially a thin wrapper with a few added functionalities

  • Automatically add Firebase auth JWT token to request header using this api
    • Note that if you are not logged in to firebase auth, the token will simply be not included. It is only included if available.
  • Allow you to define a base API URL used throughout all your requests
  • Extend or modify the fetch request's init parameter
  • Parses the body as either JSON or a string, if neither, it will throw an error and return the error back to the user.

Dependencies

  • This package depends on the browsers' fetch method.
    • Will throw an error if loaded without that being available!

Token verification

For token verification on the backend, refer to this module's complimentary token verification express middleware module.

Examples

-- TODO --

License, Author and Contributing

This project is developed and made available under the "MIT License". Feel free to use it however you like!
If you have any questions, contact us via email
Authors:

Keywords

fetch

FAQs

Package last updated on 31 Jan 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts