Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sheetgo-react-google-one-tap-sign-in

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sheetgo-react-google-one-tap-sign-in - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

9

dist/index.es5.js

@@ -131,4 +131,9 @@ import { useState, useEffect, memo } from 'react';

function useGoogleOneTapLogin(_a) {
var onError = _a.onError, disabled = _a.disabled, onSuccess = _a.onSuccess, googleAccountConfigs = _a.googleAccountConfigs;
var onError = _a.onError, disabled = _a.disabled, onSuccess = _a.onSuccess, onMoment = _a.onMoment, googleAccountConfigs = _a.googleAccountConfigs;
var script = useScript(googleClientScriptURL);
var momentCallback = function({ g, h, j }) {
if (onMoment && typeof onMoment === 'function') {
onMoment(g, h, j);
}
}
useEffect(function () {

@@ -142,3 +147,3 @@ if (!(window === null || window === void 0 ? void 0 : window[scriptFlag]) && window.google && script === 'ready') {

if ((window === null || window === void 0 ? void 0 : window[scriptFlag]) && script === 'ready' && !disabled) {
window.google.accounts.id.prompt();
window.google.accounts.id.prompt(momentCallback);
}

@@ -145,0 +150,0 @@ }, [script, window === null || window === void 0 ? void 0 : window[scriptFlag], disabled]);

@@ -135,3 +135,8 @@ (function (global, factory) {

function useGoogleOneTapLogin(_a) {
var onError = _a.onError, disabled = _a.disabled, onSuccess = _a.onSuccess, googleAccountConfigs = _a.googleAccountConfigs;
var onError = _a.onError, disabled = _a.disabled, onSuccess = _a.onSuccess, onMoment = _a.onMoment, googleAccountConfigs = _a.googleAccountConfigs;
var momentCallback = function({ g, h, j }) {
if (onMoment && typeof onMoment === 'function') {
onMoment(g, h, j);
}
}
var script = useScript(googleClientScriptURL);

@@ -146,3 +151,3 @@ react.useEffect(function () {

if ((window === null || window === void 0 ? void 0 : window[scriptFlag]) && script === 'ready' && !disabled) {
window.google.accounts.id.prompt();
window.google.accounts.id.prompt(momentCallback);
}

@@ -149,0 +154,0 @@ }, [script, window === null || window === void 0 ? void 0 : window[scriptFlag], disabled]);

@@ -57,4 +57,9 @@ "use strict";

function useGoogleOneTapLogin(_a) {
var onError = _a.onError, disabled = _a.disabled, onSuccess = _a.onSuccess, googleAccountConfigs = _a.googleAccountConfigs;
var onError = _a.onError, disabled = _a.disabled, onSuccess = _a.onSuccess, onMoment = _a.onMoment, googleAccountConfigs = _a.googleAccountConfigs;
var script = useScript_1.default(googleClientScriptURL);
var momentCallback = function({ g, h, j }) {
if (onMoment && typeof onMoment === 'function') {
onMoment(g, h, j);
}
}
react_1.useEffect(function () {

@@ -68,3 +73,3 @@ if (!(window === null || window === void 0 ? void 0 : window[scriptFlag]) && window.google && script === 'ready') {

if ((window === null || window === void 0 ? void 0 : window[scriptFlag]) && script === 'ready' && !disabled) {
window.google.accounts.id.prompt();
window.google.accounts.id.prompt(momentCallback);
}

@@ -71,0 +76,0 @@ }, [script, window === null || window === void 0 ? void 0 : window[scriptFlag], disabled]);

@@ -16,2 +16,4 @@ import { ReactElement } from 'react';

onSuccess?: (response: IGoogleEndPointResponse) => void;
onMoment?: (eventType?: string, value?: boolean | string, message?: string) => void;
decodeToken?: boolean
}

@@ -18,0 +20,0 @@ export interface IGoogleOneTapLoginProps {

import { IUseGoogleOneTapLogin } from './types';
export declare function useGoogleOneTapLogin({ onError, disabled, onSuccess, googleAccountConfigs, }: IUseGoogleOneTapLogin): null;
export declare function useGoogleOneTapLogin({ onError, disabled, onSuccess, onMoment, googleAccountConfigs, decodeToken }: IUseGoogleOneTapLogin): null;
{
"name": "sheetgo-react-google-one-tap-sign-in",
"version": "1.0.0",
"version": "1.0.1",
"description": "Sheetgo forking of React wrapper for google one tap authentication",

@@ -5,0 +5,0 @@ "keywords": [

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