@react-oauth/google
Advanced tools
Comparing version
@@ -162,4 +162,4 @@ import React, { useState, useRef, useEffect, createContext, useMemo, useContext, useCallback } from 'react'; | ||
}, [clientId, scriptLoadedSuccessfully, flow, scope]); | ||
const loginImplicitFlow = useCallback((overrideConfig) => clientRef.current.requestAccessToken(overrideConfig), []); | ||
const loginAuthCodeFlow = useCallback(() => clientRef.current.requestCode(), []); | ||
const loginImplicitFlow = useCallback((overrideConfig) => { var _a; return (_a = clientRef.current) === null || _a === void 0 ? void 0 : _a.requestAccessToken(overrideConfig); }, []); | ||
const loginAuthCodeFlow = useCallback(() => { var _a; return (_a = clientRef.current) === null || _a === void 0 ? void 0 : _a.requestCode(); }, []); | ||
return flow === 'implicit' ? loginImplicitFlow : loginAuthCodeFlow; | ||
@@ -166,0 +166,0 @@ } |
@@ -170,4 +170,4 @@ 'use strict'; | ||
}, [clientId, scriptLoadedSuccessfully, flow, scope]); | ||
const loginImplicitFlow = React.useCallback((overrideConfig) => clientRef.current.requestAccessToken(overrideConfig), []); | ||
const loginAuthCodeFlow = React.useCallback(() => clientRef.current.requestCode(), []); | ||
const loginImplicitFlow = React.useCallback((overrideConfig) => { var _a; return (_a = clientRef.current) === null || _a === void 0 ? void 0 : _a.requestAccessToken(overrideConfig); }, []); | ||
const loginAuthCodeFlow = React.useCallback(() => { var _a; return (_a = clientRef.current) === null || _a === void 0 ? void 0 : _a.requestCode(); }, []); | ||
return flow === 'implicit' ? loginImplicitFlow : loginAuthCodeFlow; | ||
@@ -174,0 +174,0 @@ } |
{ | ||
"name": "@react-oauth/google", | ||
"version": "0.6.0", | ||
"version": "0.6.1", | ||
"description": "Google OAuth2 using Google Identity Services for React 🚀", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
68708
0.39%