Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
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
  • npm
  • Socket score

Version published
Weekly downloads
0
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

  1. 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.
  2. Allow you to define a base API URL used throughout all your requests
  3. Extend or modify the fetch request's init parameter
  4. 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

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

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