Exciting release!Introducing "safe npm". Learn more
Socket
Log inDemoInstall

@8base/web-oauth-client

Package Overview
Dependencies
2
Maintainers
6
Versions
42
Issues
File Explorer

Advanced tools

@8base/web-oauth-client

The 8base web oauth client for the `AuthProvider`.

    1.6.2latest
    GitHub

Version published
Maintainers
6
Weekly downloads
1,014
increased by51.12%

Weekly downloads

Readme

Source

8base api token auth client

The 8base web oauth client for the AuthProvider.

WebOAuthClient

Table of Contents
  • WebOAuthClient

WebOAuthClient

Create instance of the web oauth client

Parameters
  • authorize Function Function used to describe authorize logic.

Usage

Firebase oauth

import firebase from 'firebase'; import { WebOAuthClient } from '@8base/web-oauth-client'; const FIREBASE_CONFIGURATION = { apiKey: "", authDomain: "", databaseURL: "", projectId: "", storageBucket: "", messagingSenderId: "", appId: "" }; const firebaseAuth = firebase.initializeApp(FIREBASE_CONFIGURATION).auth(); const authClient = new WebOAuthClient({ authorize (email, password) { return firebaseAuth.signInWithEmailAndPassword( email, password, ) .then(() => firebaseAuth.currentUser.getIdToken()) .then((token) => { return token; }) }, logout() { window.addEventListener('unload', () => { this.purgeState(); }); window.location.href = '/'; } });

Examples

Firebase oauth example
IBM cloud oauth example

FAQs

Last updated on 22 Mar 2022

Did you know?

Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install Socket
Socket
support@socket.devSocket SOC 2 Logo

Product

  • Package Issues
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc