@meese-os/google-api-provider

1.0.3 • Public • Published

meeseOS Google API Provider

This is the Google API Provider for meeseOS.

Installation

npm install @meese-os/google-api-provider

In your client bootstrap file (src/client/index.js):

import { GapiServiceProvider } from "@meese-os/google-api-provider";

meeseOS.register(GapiServiceProvider, {
  args: {
    enabled: true,
    src: "https://accounts.google.com/gsi/client",

    // You have to define these
    client: {
      api_key: "",
      client_id: "",
      scope: []
    }
  }
});

Usage

For example in an application:

const meeseOSgapi = core.make("meeseOS/gapi").create();
meeseOSgapi.on("signed-in", () => console.log("You were signed in"));
meeseOSgapi.on("signed-out", () => console.log("You were signed out"));

meeseOSgapi.login().then(gapi => {
  // Do whatever
});

proc.on("destroy", () => meeseOSgapi.destroy());

Package Sidebar

Install

npm i @meese-os/google-api-provider

Weekly Downloads

9

Version

1.0.3

License

BSD-2-Clause

Unpacked Size

56.2 kB

Total Files

6

Last publish

Collaborators

  • ajmeese7