@react-oauth/google
Advanced tools
Comparing version
@@ -138,2 +138,11 @@ /// <reference types="react" /> | ||
} | ||
declare type NonOAuthError = { | ||
/** | ||
* Some non-OAuth errors, such as the popup window is failed to open; | ||
* or closed before an OAuth response is returned. | ||
* https://developers.google.com/identity/oauth2/web/reference/js-reference#TokenClientConfig | ||
* https://developers.google.com/identity/oauth2/web/reference/js-reference#CodeClientConfig | ||
*/ | ||
type: 'popup_failed_to_open' | 'popup_closed' | 'unknown'; | ||
}; | ||
interface TokenClientConfig { | ||
@@ -157,2 +166,7 @@ /** | ||
/** | ||
* Optional. The JavaScript function that handles some non-OAuth errors, | ||
* such as the popup window is failed to open; or closed before an OAuth response is returned. | ||
*/ | ||
error_callback?: (nonOAuthError: NonOAuthError) => void; | ||
/** | ||
* Optional, defaults to 'select_account'. A space-delimited, case-sensitive list of prompts to present the user | ||
@@ -301,11 +315,2 @@ */ | ||
declare type NonOAuthError = { | ||
/** | ||
* Some non-OAuth errors, such as the popup window is failed to open; | ||
* or closed before an OAuth response is returned. | ||
* https://developers.google.com/identity/oauth2/web/reference/js-reference#TokenClientConfig | ||
* https://developers.google.com/identity/oauth2/web/reference/js-reference#CodeClientConfig | ||
*/ | ||
type: 'popup_failed_to_open' | 'popup_closed' | 'unknown'; | ||
}; | ||
interface ImplicitFlowOptions extends Omit<TokenClientConfig, 'client_id' | 'scope' | 'callback'> { | ||
@@ -356,2 +361,2 @@ onSuccess?: (tokenResponse: Omit<TokenResponse, 'error' | 'error_description' | 'error_uri'>) => void; | ||
export { CodeClientConfig, CodeResponse, CredentialResponse, GoogleCredentialResponse, GoogleLogin, GoogleLoginProps, GoogleOAuthProvider, GsiButtonConfiguration, IdConfiguration, MomentListener, OverridableTokenClientConfig, PromptMomentNotification, TokenClientConfig, TokenResponse, UseGoogleLoginOptions, UseGoogleLoginOptionsAuthCodeFlow, UseGoogleLoginOptionsImplicitFlow, googleLogout, hasGrantedAllScopesGoogle, hasGrantedAnyScopeGoogle, useGoogleLogin, useGoogleOneTapLogin }; | ||
export { CodeClientConfig, CodeResponse, Context, CredentialResponse, ErrorCode, GoogleCredentialResponse, GoogleLogin, GoogleLoginProps, GoogleOAuthProvider, GsiButtonConfiguration, IdConfiguration, MomentListener, NonOAuthError, OverridableTokenClientConfig, PromptMomentNotification, TokenClientConfig, TokenResponse, UseGoogleLoginOptions, UseGoogleLoginOptionsAuthCodeFlow, UseGoogleLoginOptionsImplicitFlow, UxMode, googleLogout, hasGrantedAllScopesGoogle, hasGrantedAnyScopeGoogle, useGoogleLogin, useGoogleOneTapLogin }; |
{ | ||
"name": "@react-oauth/google", | ||
"version": "0.7.2", | ||
"version": "0.7.3", | ||
"description": "Google OAuth2 using Google Identity Services for React 🚀", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
72669
0.42%803
0.63%