-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapi.html
More file actions
328 lines (328 loc) · 82.4 KB
/
Copy pathapi.html
File metadata and controls
328 lines (328 loc) · 82.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
<!doctype html><html lang=en dir=ltr class="docs-wrapper plugin-docs plugin-id-default docs-version-current docs-doc-page docs-doc-id-api/index" data-has-hydrated=false><head><meta charset=UTF-8><meta name=generator content="Docusaurus v3.10.1"><title data-rh=true>API reference | React Native Google Sign In</title><meta data-rh=true name=viewport content="width=device-width, initial-scale=1.0"/><meta data-rh=true name=twitter:card content=summary_large_image /><meta data-rh=true property=og:image content=https://react-native-google-signin.github.io/img/social-card.jpg /><meta data-rh=true name=twitter:image content=https://react-native-google-signin.github.io/img/social-card.jpg /><meta data-rh=true property=og:url content=https://react-native-google-signin.github.io/docs/api /><meta data-rh=true property=og:locale content=en /><meta data-rh=true name=docusaurus_locale content=en /><meta data-rh=true name=docsearch:language content=en /><meta data-rh=true name=docusaurus_version content=current /><meta data-rh=true name=docusaurus_tag content=docs-default-current /><meta data-rh=true name=docsearch:version content=current /><meta data-rh=true name=docsearch:docusaurus_tag content=docs-default-current /><meta data-rh=true property=og:title content="API reference | React Native Google Sign In"/><meta data-rh=true name=description content="API reference for `GoogleOneTapSignIn` (Universal) and `GoogleSignin` (Original) modules. Covers `configure()`, `signIn()`, `createAccount()`, `requestAuthorization()`, and all types."/><meta data-rh=true property=og:description content="API reference for `GoogleOneTapSignIn` (Universal) and `GoogleSignin` (Original) modules. Covers `configure()`, `signIn()`, `createAccount()`, `requestAuthorization()`, and all types."/><link data-rh=true rel=icon href=/img/favicon.ico /><link data-rh=true rel=canonical href=https://react-native-google-signin.github.io/docs/api /><link data-rh=true rel=alternate href=https://react-native-google-signin.github.io/docs/api hreflang=en /><link data-rh=true rel=alternate href=https://react-native-google-signin.github.io/docs/api hreflang=x-default /><script data-rh=true type=application/ld+json>{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","item":"https://react-native-google-signin.github.io/docs/api/","name":"API reference","position":1}]}</script><link rel=stylesheet href=/assets/css/styles.c655e8c7.css /><script src=/assets/js/runtime~main.27c8b818.js defer></script><script src=/assets/js/main.1cb569e4.js defer></script></head><body><svg style="display: none;"><defs>
<symbol id=theme-svg-external-link viewBox="0 0 24 24"><path fill=currentColor d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"/></symbol>
</defs></svg>
<script>!function(){var t=function(){try{return new URLSearchParams(window.location.search).get("docusaurus-theme")}catch(t){}}()||function(){try{return window.localStorage.getItem("theme-32e")}catch(t){}}();document.documentElement.setAttribute("data-theme",t||(window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light")),document.documentElement.setAttribute("data-theme-choice",t||"system")}(),function(){try{for(var[t,e]of new URLSearchParams(window.location.search).entries())if(t.startsWith("docusaurus-data-")){var a=t.replace("docusaurus-data-","data-");document.documentElement.setAttribute(a,e)}}catch(t){}}()</script><div id=__docusaurus><link rel=preload as=image href=/img/logo.png /><div role=region aria-label="Skip to main content"><a class=skipToContent_fXgn href=#__docusaurus_skipToContent_fallback>Skip to main content</a></div><nav aria-label=Main class="theme-layout-navbar navbar navbar--fixed-top"><div class=navbar__inner><div class="theme-layout-navbar-left navbar__items"><button aria-label="Toggle navigation bar" aria-expanded=false class="navbar__toggle clean-btn" type=button><svg width=30 height=30 viewBox="0 0 30 30" aria-hidden=true><path stroke=currentColor stroke-linecap=round stroke-miterlimit=10 stroke-width=2 d="M4 7h22M4 15h22M4 23h22"/></svg></button><a class=navbar__brand href=/><div class=navbar__logo><img src=/img/logo.png alt="My Site Logo" class="themedComponent_mlkZ themedComponent--light_NVdE"/><img src=/img/logo.png alt="My Site Logo" class="themedComponent_mlkZ themedComponent--dark_xIcU"/></div><b class="navbar__title text--truncate">RN Google Sign In</b></a><a class="navbar__item navbar__link" href=/docs/install>Guides</a><a aria-current=page class="navbar__item navbar__link navbar__link--active" href=/docs/api>API</a><a class="navbar__item navbar__link" href=/examples>Example native & web app</a><div class="navbar__item dropdown dropdown--hoverable"><a href=# aria-haspopup=true aria-expanded=false role=button class=navbar__link>LLMs</a><ul class=dropdown__menu><li><a href=/llms.txt target=_blank rel="noopener noreferrer" class=dropdown__link>llms.txt<svg width=12 height=12 aria-label="(opens in new tab)" class=iconExternalLink_nPIU><use href=#theme-svg-external-link /></svg></a><li><a href=/llms-full.txt target=_blank rel="noopener noreferrer" class=dropdown__link>llms-full.txt<svg width=12 height=12 aria-label="(opens in new tab)" class=iconExternalLink_nPIU><use href=#theme-svg-external-link /></svg></a></ul></div></div><div class="theme-layout-navbar-right navbar__items navbar__items--right"><a class="navbar__item navbar__link" href=/github-repo>GitHub</a><div class="toggle_vylO colorModeToggle_DEke"><button class="clean-btn toggleButton_gllP toggleButtonDisabled_aARS" type=button disabled title="system mode" aria-label="Switch between dark and light mode (currently system mode)"><svg viewBox="0 0 24 24" width=24 height=24 aria-hidden=true class="toggleIcon_g3eP lightToggleIcon_pyhR"><path fill=currentColor d="M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"/></svg><svg viewBox="0 0 24 24" width=24 height=24 aria-hidden=true class="toggleIcon_g3eP darkToggleIcon_wfgR"><path fill=currentColor d="M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"/></svg><svg viewBox="0 0 24 24" width=24 height=24 aria-hidden=true class="toggleIcon_g3eP systemToggleIcon_QzmC"><path fill=currentColor d="m12 21c4.971 0 9-4.029 9-9s-4.029-9-9-9-9 4.029-9 9 4.029 9 9 9zm4.95-13.95c1.313 1.313 2.05 3.093 2.05 4.95s-0.738 3.637-2.05 4.95c-1.313 1.313-3.093 2.05-4.95 2.05v-14c1.857 0 3.637 0.737 4.95 2.05z"/></svg></button></div><div class=navbarSearchContainer_Bca1><div class=navbar__search><span aria-label="expand searchbar" role=button class=search-icon tabindex=0></span><input id=search_input_react type=search placeholder=Loading... aria-label=Search class="navbar__search-input search-bar" disabled/></div></div></div></div><div role=presentation class=navbar-sidebar__backdrop></div></nav><div id=__docusaurus_skipToContent_fallback class="theme-layout-main main-wrapper mainWrapper_z2l0"><div class=docsWrapper_hBAB><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_sjWU" type=button></button><div class=docRoot_UBD9><aside class="theme-doc-sidebar-container docSidebarContainer_YfHR"><div class=sidebarViewport_aRkj><div class=sidebar_njMd><nav aria-label="Docs sidebar" class="menu thin-scrollbar menu_SIkG"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link menu__link--active" aria-current=page href=/docs/api><span title="API reference" class=linkLabel_WmDU>API reference</span></a></ul></nav></div></div></aside><main class=docMainContainer_TBSr><div class="container padding-top--md padding-bottom--lg"><div class=row><div class="col docItemCol_VOVn"><div class=docItemContainer_Djhp><article><div class=breadcrumbsWrapper_xlkt><nav class="theme-doc-breadcrumbs breadcrumbsContainer_Z_bl" aria-label=Breadcrumbs><ul class=breadcrumbs><li class=breadcrumbs__item><a aria-label="Home page" class=breadcrumbs__link href=/><svg viewBox="0 0 24 24" class=breadcrumbHomeIcon_YNFT><path d="M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z" fill=currentColor /></svg></a><li class="breadcrumbs__item breadcrumbs__item--active"><span class=breadcrumbs__link>API reference</span></ul></nav></div><div class="tocCollapsible_ETCw theme-doc-toc-mobile tocMobile_ITEo"><button type=button class="clean-btn tocCollapsibleButton_TO0P">On this page</button></div><div class="theme-doc-markdown markdown"><header><h1>API reference</h1></header>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id=universal-sign-in-module>Universal sign in module<a href=#universal-sign-in-module class=hash-link aria-label="Direct link to Universal sign in module" title="Direct link to Universal sign in module" translate=no></a></h2>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id=authorizationresponse>AuthorizationResponse<a href=#authorizationresponse class=hash-link aria-label="Direct link to AuthorizationResponse" title="Direct link to AuthorizationResponse" translate=no></a></h3>
<blockquote>
<p><strong>AuthorizationResponse</strong> = <a href=#cancelledresponse class=""><code>CancelledResponse</code></a> | <a href=#authorizationsuccessresponse class=""><code>AuthorizationSuccessResponse</code></a></p>
</blockquote>
<p>The response object of <code>requestAuthorization</code>. Either the user cancelled the flow or they successfully gave authorization.</p>
<hr/>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id=authorizationsuccessresponse>AuthorizationSuccessResponse<a href=#authorizationsuccessresponse class=hash-link aria-label="Direct link to AuthorizationSuccessResponse" title="Direct link to AuthorizationSuccessResponse" translate=no></a></h3>
<blockquote>
<p><strong>AuthorizationSuccessResponse</strong> = { <code>data</code>: { <code>accessToken</code>: <code>string</code>; <code>grantedScopes</code>: <code>string</code>[]; <code>serverAuthCode</code>: <code>string</code> | <code>null</code>; }; <code>type</code>: <code>"success"</code>; }</p>
</blockquote>
<p>An object that contains an access token that has access to the <code>grantedScopes</code>.
It contains also the <code>serverAuthCode</code> if <code>offlineAccess</code> was requested.</p>
<p>On iOS, you can also obtain <code>serverAuthCode</code> by calling <code>createAccount()</code>.</p>
<h4 class="anchor anchorTargetStickyNavbar_Vzrq" id=properties>Properties<a href=#properties class=hash-link aria-label="Direct link to Properties" title="Direct link to Properties" translate=no></a></h4>
<table><thead><tr><th>Property<th>Type<tbody><tr><td><a id=property-data></a> <code>data</code><td>{ <code>accessToken</code>: <code>string</code>; <code>grantedScopes</code>: <code>string</code>[]; <code>serverAuthCode</code>: <code>string</code> | <code>null</code>; }<tr><td><code>data.accessToken</code><td><code>string</code><tr><td><code>data.grantedScopes</code><td><code>string</code>[]<tr><td><code>data.serverAuthCode</code><td><code>string</code> | <code>null</code><tr><td><a id=property-type></a> <code>type</code><td><code>"success"</code></table>
<hr/>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id=enableappcheckparams>EnableAppCheckParams<a href=#enableappcheckparams class=hash-link aria-label="Direct link to EnableAppCheckParams" title="Direct link to EnableAppCheckParams" translate=no></a></h3>
<blockquote>
<p><strong>EnableAppCheckParams</strong> = { <code>debugProviderAPIKey?</code>: <code>string</code>; }</p>
</blockquote>
<p>Parameters for enabling <a class="" href=/docs/security#appcheck>App Check</a>. Provide <code>debugProviderAPIKey</code> to enable App Check with <a href=https://developers.google.com/identity/sign-in/ios/appcheck/debug-provider target=_blank rel="noopener noreferrer" class="">debug provider</a>.</p>
<h4 class="anchor anchorTargetStickyNavbar_Vzrq" id=properties-1>Properties<a href=#properties-1 class=hash-link aria-label="Direct link to Properties" title="Direct link to Properties" translate=no></a></h4>
<table><thead><tr><th>Property<th>Type<tbody><tr><td><a id=property-debugproviderapikey></a> <code>debugProviderAPIKey?</code><td><code>string</code></table>
<hr/>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id=onetapconfigureparams>OneTapConfigureParams<a href=#onetapconfigureparams class=hash-link aria-label="Direct link to OneTapConfigureParams" title="Direct link to OneTapConfigureParams" translate=no></a></h3>
<blockquote>
<p><strong>OneTapConfigureParams</strong> = <a href=#clientidorplistpath class=""><code>ClientIdOrPlistPath</code></a> & { <code>hostedDomain?</code>: <code>string</code>; <code>logLevel?</code>: <code>"debug"</code> | <code>"info"</code> | <code>"warn"</code>; <code>openIdRealm?</code>: <code>string</code>; <code>profileImageSize?</code>: <code>number</code>; <code>scopes?</code>: <code>string</code>[]; <code>webClientId</code>: <code>WebClientId</code>; }</p>
</blockquote>
<p><code>webClientId</code> is the most important parameter in the configuration. It is required.</p>
<h4 class="anchor anchorTargetStickyNavbar_Vzrq" id=type-declaration>Type Declaration<a href=#type-declaration class=hash-link aria-label="Direct link to Type Declaration" title="Direct link to Type Declaration" translate=no></a></h4>
<table><thead><tr><th>Name<th>Type<th>Description<tbody><tr><td><code>hostedDomain?</code><td><code>string</code><td>iOS only. Specifies a hosted domain restriction. By setting this, authorization will be restricted to accounts of the user in the specified domain.<tr><td><code>logLevel?</code><td><code>"debug"</code> | <code>"info"</code> | <code>"warn"</code><td>Web only. Controls debug logging in browser console. This is implemented in Google's web SDK and is not part of their public API so it may change or be removed at any time.<tr><td><code>openIdRealm?</code><td><code>string</code><td>iOS only. The OpenID2 realm of the home web server. This allows Google to include the user's OpenID Identifier in the OpenID Connect ID token.<tr><td><code>profileImageSize?</code><td><code>number</code><td>iOS only. The desired height and width of the profile image. <strong>Default</strong> <code>120px</code><tr><td><code>scopes?</code><td><code>string</code>[]<td>iOS only. The Google API scopes to request access to. Use <code>requestAuthorization</code> to request additional scopes on Android. <strong>Default</strong> <code>["email", "profile"]</code><tr><td><code>webClientId</code><td><code>WebClientId</code><td>The web client ID obtained from Google Cloud console. In the Universal module only, pass <code>autoDetect</code> to automatically determine the value from Firebase config file.</table>
<hr/>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id=onetapcreateaccountparams>OneTapCreateAccountParams<a href=#onetapcreateaccountparams class=hash-link aria-label="Direct link to OneTapCreateAccountParams" title="Direct link to OneTapCreateAccountParams" translate=no></a></h3>
<blockquote>
<p><strong>OneTapCreateAccountParams</strong> = <a href=#onetapsigninparams class=""><code>OneTapSignInParams</code></a> & { <code>accountName?</code>: <code>string</code>; <code>requestVerifiedPhoneNumber?</code>: <code>boolean</code>; }</p>
</blockquote>
<h4 class="anchor anchorTargetStickyNavbar_Vzrq" id=type-declaration-1>Type Declaration<a href=#type-declaration-1 class=hash-link aria-label="Direct link to Type Declaration" title="Direct link to Type Declaration" translate=no></a></h4>
<table><thead><tr><th>Name<th>Type<th>Description<tbody><tr><td><code>accountName?</code><td><code>string</code><td>iOS only. An account name present on the device that should be used. <strong>Example</strong> <code>your_email@gmail.com</code><tr><td><code>requestVerifiedPhoneNumber?</code><td><code>boolean</code><td>Android only. Whether to request for a verified phone number during sign-ups. Requesting it doesn't guarantee that it will be provided in the response. <strong>Default</strong> <code>false</code></table>
<hr/>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id=onetapexplicitsigninparams>OneTapExplicitSignInParams<a href=#onetapexplicitsigninparams class=hash-link aria-label="Direct link to OneTapExplicitSignInParams" title="Direct link to OneTapExplicitSignInParams" translate=no></a></h3>
<blockquote>
<p><strong>OneTapExplicitSignInParams</strong> = <a href=#onetapsigninparams class=""><code>OneTapSignInParams</code></a> & { <code>accountName?</code>: <code>string</code>; }</p>
</blockquote>
<h4 class="anchor anchorTargetStickyNavbar_Vzrq" id=type-declaration-2>Type Declaration<a href=#type-declaration-2 class=hash-link aria-label="Direct link to Type Declaration" title="Direct link to Type Declaration" translate=no></a></h4>
<table><thead><tr><th>Name<th>Type<th>Description<tbody><tr><td><code>accountName?</code><td><code>string</code><td>iOS only. An account name present on the device that should be used. <strong>Example</strong> <code>your_email@gmail.com</code></table>
<hr/>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id=onetapexplicitsigninresponse>OneTapExplicitSignInResponse<a href=#onetapexplicitsigninresponse class=hash-link aria-label="Direct link to OneTapExplicitSignInResponse" title="Direct link to OneTapExplicitSignInResponse" translate=no></a></h3>
<blockquote>
<p><strong>OneTapExplicitSignInResponse</strong> = <a href=#onetapsuccessresponse class=""><code>OneTapSuccessResponse</code></a> | <a href=#cancelledresponse class=""><code>CancelledResponse</code></a></p>
</blockquote>
<hr/>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id=onetapresponse>OneTapResponse<a href=#onetapresponse class=hash-link aria-label="Direct link to OneTapResponse" title="Direct link to OneTapResponse" translate=no></a></h3>
<blockquote>
<p><strong>OneTapResponse</strong> = <a href=#onetapsuccessresponse class=""><code>OneTapSuccessResponse</code></a> | <a href=#cancelledresponse class=""><code>CancelledResponse</code></a> | <a href=#nosavedcredentialfound class=""><code>NoSavedCredentialFound</code></a></p>
</blockquote>
<p>The response object for OneTap's <code>signIn</code> and <code>createAccount</code>.</p>
<hr/>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id=onetapsigninparams>OneTapSignInParams<a href=#onetapsigninparams class=hash-link aria-label="Direct link to OneTapSignInParams" title="Direct link to OneTapSignInParams" translate=no></a></h3>
<blockquote>
<p><strong>OneTapSignInParams</strong> = { <code>nonce?</code>: <code>string</code>; <code>skipPrompt?</code>: <code>boolean</code>; } & <code>ReducedWebSignInOptions</code></p>
</blockquote>
<p>Learn more about additional web-only parameters at <a href=https://developers.google.com/identity/gsi/web/reference/js-reference#IdConfiguration target=_blank rel="noopener noreferrer" class="">Google's reference documentation</a>.</p>
<h4 class="anchor anchorTargetStickyNavbar_Vzrq" id=type-declaration-3>Type Declaration<a href=#type-declaration-3 class=hash-link aria-label="Direct link to Type Declaration" title="Direct link to Type Declaration" translate=no></a></h4>
<table><thead><tr><th>Name<th>Type<th>Description<tbody><tr><td><code>nonce?</code><td><code>string</code><td>A cryptographically random value used to mitigate replay attacks. Supported on all platforms.<tr><td><code>skipPrompt?</code><td><code>boolean</code><td>Web only. When calling any of the sign-in methods, a prompt is displayed by default on the top-right of the web page. Set this to true to only allow signing in via the <code>WebGoogleSigninButton</code>. <strong>Default</strong> <code>false</code></table>
<hr/>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id=onetapsuccessresponse>OneTapSuccessResponse<a href=#onetapsuccessresponse class=hash-link aria-label="Direct link to OneTapSuccessResponse" title="Direct link to OneTapSuccessResponse" translate=no></a></h3>
<blockquote>
<p><strong>OneTapSuccessResponse</strong> = { <code>data</code>: <a href=#onetapuser class=""><code>OneTapUser</code></a>; <code>type</code>: <code>"success"</code>; }</p>
</blockquote>
<p>The response object when the user successfully signs in.</p>
<h4 class="anchor anchorTargetStickyNavbar_Vzrq" id=properties-2>Properties<a href=#properties-2 class=hash-link aria-label="Direct link to Properties" title="Direct link to Properties" translate=no></a></h4>
<table><thead><tr><th>Property<th>Type<tbody><tr><td><a id=property-data-3></a> <code>data</code><td><a href=#onetapuser class=""><code>OneTapUser</code></a><tr><td><a id=property-type-3></a> <code>type</code><td><code>"success"</code></table>
<hr/>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id=onetapuser>OneTapUser<a href=#onetapuser class=hash-link aria-label="Direct link to OneTapUser" title="Direct link to OneTapUser" translate=no></a></h3>
<blockquote>
<p><strong>OneTapUser</strong> = { <code>credentialOrigin</code>: <code>CredentialResponse</code>[<code>"select_by"</code>]; <code>idToken</code>: <code>string</code>; <code>serverAuthCode</code>: <code>string</code> | <code>null</code>; <code>user</code>: { <code>email</code>: <code>string</code> | <code>null</code>; <code>familyName</code>: <code>string</code> | <code>null</code>; <code>givenName</code>: <code>string</code> | <code>null</code>; <code>id</code>: <code>string</code>; <code>name</code>: <code>string</code> | <code>null</code>; <code>phoneNumber</code>: <code>string</code> | <code>null</code>; <code>photo</code>: <code>string</code> | <code>null</code>; }; }</p>
</blockquote>
<h4 class="anchor anchorTargetStickyNavbar_Vzrq" id=properties-3>Properties<a href=#properties-3 class=hash-link aria-label="Direct link to Properties" title="Direct link to Properties" translate=no></a></h4>
<table><thead><tr><th>Property<th>Type<th>Description<tbody><tr><td><a id=property-credentialorigin></a> <code>credentialOrigin</code><td><code>CredentialResponse</code>[<code>"select_by"</code>]<td>The credential origin. This is the method that was used to sign in the user. On native platforms, this is always "user". On the web it's a value from a union type.<tr><td><a id=property-idtoken-1></a> <code>idToken</code><td><code>string</code><td>-<tr><td><a id=property-serverauthcode></a> <code>serverAuthCode</code><td><code>string</code> | <code>null</code><td>iOS only. Not null only if a valid <code>webClientId</code> and <code>offlineAccess: true</code> was specified in <code>configure()</code>. Call <code>requestAuthorization()</code> to obtain it on Android.<tr><td><a id=property-user></a> <code>user</code><td>{ <code>email</code>: <code>string</code> | <code>null</code>; <code>familyName</code>: <code>string</code> | <code>null</code>; <code>givenName</code>: <code>string</code> | <code>null</code>; <code>id</code>: <code>string</code>; <code>name</code>: <code>string</code> | <code>null</code>; <code>phoneNumber</code>: <code>string</code> | <code>null</code>; <code>photo</code>: <code>string</code> | <code>null</code>; }<td>-<tr><td><code>user.email</code><td><code>string</code> | <code>null</code><td>-<tr><td><code>user.familyName</code><td><code>string</code> | <code>null</code><td>-<tr><td><code>user.givenName</code><td><code>string</code> | <code>null</code><td>-<tr><td><code>user.id</code><td><code>string</code><td>An immutable identifier for the user. Unique among all Google accounts and never reused (user's email can change, this value cannot).<tr><td><code>user.name</code><td><code>string</code> | <code>null</code><td>-<tr><td><code>user.phoneNumber</code><td><code>string</code> | <code>null</code><td>Android only, and only for <code>createAccount</code>. Requires setting <code>requestVerifiedPhoneNumber</code> to <code>true</code>.<tr><td><code>user.photo</code><td><code>string</code> | <code>null</code><td>-</table>
<hr/>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id=playservicesinfo>PlayServicesInfo<a href=#playservicesinfo class=hash-link aria-label="Direct link to PlayServicesInfo" title="Direct link to PlayServicesInfo" translate=no></a></h3>
<blockquote>
<p><strong>PlayServicesInfo</strong> = { <code>installedVersion</code>: <code>number</code>; <code>minRequiredVersion</code>: <code>number</code>; }</p>
</blockquote>
<p>The response object for successful <code>checkPlayServices</code> call. It denotes that the necessary prerequisites for calling the module in methods are met.</p>
<h4 class="anchor anchorTargetStickyNavbar_Vzrq" id=properties-4>Properties<a href=#properties-4 class=hash-link aria-label="Direct link to Properties" title="Direct link to Properties" translate=no></a></h4>
<table><thead><tr><th>Property<th>Type<tbody><tr><td><a id=property-installedversion></a> <code>installedVersion</code><td><code>number</code><tr><td><a id=property-minrequiredversion></a> <code>minRequiredVersion</code><td><code>number</code></table>
<hr/>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id=requestauthorizationparams>RequestAuthorizationParams<a href=#requestauthorizationparams class=hash-link aria-label="Direct link to RequestAuthorizationParams" title="Direct link to RequestAuthorizationParams" translate=no></a></h3>
<blockquote>
<p><strong>RequestAuthorizationParams</strong> = { <code>accountName?</code>: <code>string</code>; <code>hostedDomain?</code>: <code>string</code>; <code>offlineAccess?</code>: { <code>enabled</code>: <code>boolean</code>; <code>forceCodeForRefreshToken?</code>: <code>boolean</code>; }; <code>prompt?</code>: <a href=#authorizationprompt class=""><code>AuthorizationPrompt</code></a> | <a href=#authorizationprompt class=""><code>AuthorizationPrompt</code></a>[]; <code>scopes</code>: <code>string</code>[]; }</p>
</blockquote>
<p>Learn more in the <a class="" href=/docs/one-tap#requestauthorization>guide</a>.</p>
<h4 class="anchor anchorTargetStickyNavbar_Vzrq" id=properties-5>Properties<a href=#properties-5 class=hash-link aria-label="Direct link to Properties" title="Direct link to Properties" translate=no></a></h4>
<table><thead><tr><th>Property<th>Type<th>Description<tbody><tr><td><a id=property-accountname></a> <code>accountName?</code><td><code>string</code><td>Android only. Specifies an account on the device that should be used.<tr><td><a id=property-hosteddomain></a> <code>hostedDomain?</code><td><code>string</code><td>Android only. Specifies a hosted domain restriction. By setting this, authorization will be restricted to accounts of the user in the specified domain.<tr><td><a id=property-offlineaccess></a> <code>offlineAccess?</code><td>{ <code>enabled</code>: <code>boolean</code>; <code>forceCodeForRefreshToken?</code>: <code>boolean</code>; }<td>-<tr><td><code>offlineAccess.enabled</code><td><code>boolean</code><td>Whether to enable offline access. If enabled, <code>serverAuthCode</code> will be returned in the response.<tr><td><code>offlineAccess.forceCodeForRefreshToken?</code><td><code>boolean</code><td>Android only. If true, the granted code can be exchanged for an access token and a refresh token. Only use true if your server has suffered some failure and lost the user's refresh token. <strong>Deprecated</strong> Use <code>prompt: 'consent'</code> instead.<tr><td><a id=property-prompt></a> <code>prompt?</code><td><a href=#authorizationprompt class=""><code>AuthorizationPrompt</code></a> | <a href=#authorizationprompt class=""><code>AuthorizationPrompt</code></a>[]<td>Android only. Controls the prompt behavior for the authorization request. - <code>'select_account'</code>: Forces account selection (overrides <code>accountName</code>) modal to show. - <code>'consent'</code>: Forces the consent modal to show. Applies only to when <code>offlineAccess</code> is enabled. You may pass an array (<code>['consent', 'select_account']</code>) to show both modals.<tr><td><a id=property-scopes-1></a> <code>scopes</code><td><code>string</code>[]<td>The Google API scopes to request access to. See <a class="" href=/docs/integration-notes#additional-scopes>scopes docs</a>.</table>
<hr/>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id=googleonetapsignin>GoogleOneTapSignIn<a href=#googleonetapsignin class=hash-link aria-label="Direct link to GoogleOneTapSignIn" title="Direct link to GoogleOneTapSignIn" translate=no></a></h3>
<blockquote>
<p><code>const</code> <strong>GoogleOneTapSignIn</strong>: { <code>checkPlayServices</code>: (<code>showErrorResolutionDialog?</code>: <code>boolean</code>) => <code>Promise</code><<a href=#playservicesinfo class=""><code>PlayServicesInfo</code></a>>; <code>clearCachedAccessToken</code>: (<code>tokenString</code>: <code>string</code>) => <code>Promise</code><<code>null</code>>; <code>configure</code>: (<code>options</code>: <a href=#onetapconfigureparams class=""><code>OneTapConfigureParams</code></a>) => <code>void</code>; <code>createAccount</code>: <code>CreateAccountInterface</code>; <code>enableAppCheck</code>: (<code>params?</code>: <a href=#enableappcheckparams class=""><code>EnableAppCheckParams</code></a>) => <code>Promise</code><<code>null</code>>; <code>presentExplicitSignIn</code>: <code>ExplicitSignInInterface</code>; <code>requestAuthorization</code>: (<code>options</code>: <a href=#requestauthorizationparams class=""><code>RequestAuthorizationParams</code></a>) => <code>Promise</code><<a href=#authorizationresponse class=""><code>AuthorizationResponse</code></a>>; <code>revokeAccess</code>: (<code>emailOrUniqueId</code>: <code>string</code>) => <code>Promise</code><<code>null</code>>; <code>signIn</code>: <code>SignInInterface</code>; <code>signOut</code>: () => <code>Promise</code><<code>null</code>>; }</p>
</blockquote>
<p>The entry point of the Universal Sign In API, exposed as <code>GoogleOneTapSignIn</code>.</p>
<p>On the web, the signatures of <code>signIn</code>, <code>presentExplicitSignIn</code>, and <code>createAccount</code> are callback-based and on native they are Promise-based. Read more in the <a class="" href=/docs/one-tap#web-support>guide</a>.</p>
<h4 class="anchor anchorTargetStickyNavbar_Vzrq" id=type-declaration-4>Type Declaration<a href=#type-declaration-4 class=hash-link aria-label="Direct link to Type Declaration" title="Direct link to Type Declaration" translate=no></a></h4>
<table><thead><tr><th>Name<th>Type<tbody><tr><td><a id=property-checkplayservices></a> <code>checkPlayServices()</code><td>(<code>showErrorResolutionDialog?</code>: <code>boolean</code>) => <code>Promise</code><<a href=#playservicesinfo class=""><code>PlayServicesInfo</code></a>><tr><td><a id=property-clearcachedaccesstoken></a> <code>clearCachedAccessToken()</code><td>(<code>tokenString</code>: <code>string</code>) => <code>Promise</code><<code>null</code>><tr><td><a id=property-configure></a> <code>configure()</code><td>(<code>options</code>: <a href=#onetapconfigureparams class=""><code>OneTapConfigureParams</code></a>) => <code>void</code><tr><td><code>createAccount</code><td>(<code>params?</code>: <a class="" href=/docs/api#onetapcreateaccountparams><code>OneTapCreateAccountParams</code></a>) => <code>Promise</code><<a class="" href=/docs/api#onetapresponse><code>OneTapResponse</code></a>><tr><td><a id=property-enableappcheck></a> <code>enableAppCheck()</code><td>(<code>params?</code>: <a href=#enableappcheckparams class=""><code>EnableAppCheckParams</code></a>) => <code>Promise</code><<code>null</code>><tr><td><code>presentExplicitSignIn</code><td>(<code>params?</code>: <a class="" href=/docs/api#onetapexplicitsigninparams><code>OneTapExplicitSignInParams</code></a>) => <code>Promise</code><<a class="" href=/docs/api#onetapexplicitsigninresponse><code>OneTapExplicitSignInResponse</code></a>><tr><td><a id=property-requestauthorization></a> <code>requestAuthorization()</code><td>(<code>options</code>: <a href=#requestauthorizationparams class=""><code>RequestAuthorizationParams</code></a>) => <code>Promise</code><<a href=#authorizationresponse class=""><code>AuthorizationResponse</code></a>><tr><td><a id=property-revokeaccess></a> <code>revokeAccess()</code><td>(<code>emailOrUniqueId</code>: <code>string</code>) => <code>Promise</code><<code>null</code>><tr><td><code>signIn</code><td>(<code>params?</code>: <a class="" href=/docs/api#onetapsigninparams><code>OneTapSignInParams</code></a>) => <code>Promise</code><<a class="" href=/docs/api#onetapresponse><code>OneTapResponse</code></a>><tr><td><a id=property-signout></a> <code>signOut()</code><td>() => <code>Promise</code><<code>null</code>></table>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id=original-google-sign-in>Original Google sign in<a href=#original-google-sign-in class=hash-link aria-label="Direct link to Original Google sign in" title="Direct link to Original Google sign in" translate=no></a></h2>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id=addscopesparams>AddScopesParams<a href=#addscopesparams class=hash-link aria-label="Direct link to AddScopesParams" title="Direct link to AddScopesParams" translate=no></a></h3>
<blockquote>
<p><strong>AddScopesParams</strong> = { <code>scopes</code>: <code>string</code>[]; }</p>
</blockquote>
<h4 class="anchor anchorTargetStickyNavbar_Vzrq" id=properties-6>Properties<a href=#properties-6 class=hash-link aria-label="Direct link to Properties" title="Direct link to Properties" translate=no></a></h4>
<table><thead><tr><th>Property<th>Type<th>Description<tbody><tr><td><a id=property-scopes></a> <code>scopes</code><td><code>string</code>[]<td>The Google API scopes to request access to. <strong>Default</strong> <code>["email", "profile"]</code></table>
<hr/>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id=configureparams>ConfigureParams<a href=#configureparams class=hash-link aria-label="Direct link to ConfigureParams" title="Direct link to ConfigureParams" translate=no></a></h3>
<blockquote>
<p><strong>ConfigureParams</strong> = <a href=#clientidorplistpath class=""><code>ClientIdOrPlistPath</code></a> & { <code>accountName?</code>: <code>string</code>; <code>forceCodeForRefreshToken?</code>: <code>boolean</code>; <code>hostedDomain?</code>: <code>string</code>; <code>offlineAccess?</code>: <code>boolean</code>; <code>openIdRealm?</code>: <code>string</code>; <code>profileImageSize?</code>: <code>number</code>; <code>scopes?</code>: <code>string</code>[]; <code>webClientId?</code>: <code>WebClientId</code>; }</p>
</blockquote>
<h4 class="anchor anchorTargetStickyNavbar_Vzrq" id=type-declaration-5>Type Declaration<a href=#type-declaration-5 class=hash-link aria-label="Direct link to Type Declaration" title="Direct link to Type Declaration" translate=no></a></h4>
<table><thead><tr><th>Name<th>Type<th>Description<tbody><tr><td><code>accountName?</code><td><code>string</code><td>Android only. An account name that should be prioritized.<tr><td><code>forceCodeForRefreshToken?</code><td><code>boolean</code><td>Android only. Only set to <code>true</code> if your server has suffered some failure and lost the user's refresh token.<tr><td><code>hostedDomain?</code><td><code>string</code><td>Specifies a hosted domain restriction. By setting this, authorization will be restricted to accounts of the user in the specified domain.<tr><td><code>offlineAccess?</code><td><code>boolean</code><td>Must be <code>true</code> if you wish to access user APIs on behalf of the user from your own server. When offline access is requested, an authorization code is returned so the server can use the authorization code to exchange for access token and refresh token. The access token allows the server to access Google data on behalf of the user.<tr><td><code>openIdRealm?</code><td><code>string</code><td>iOS only. The OpenID2 realm of the home web server. This allows Google to include the user's OpenID Identifier in the OpenID Connect ID token.<tr><td><code>profileImageSize?</code><td><code>number</code><td>iOS only. The desired height and width of the profile image. <strong>Default</strong> <code>120px</code><tr><td><code>scopes?</code><td><code>string</code>[]<td>The Google API scopes to request access to. <strong>Default</strong> <code>["email", "profile"]</code><tr><td><code>webClientId?</code><td><code>WebClientId</code><td>The web client ID obtained from Google Cloud console. Required for offline access.</table>
<hr/>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id=gettokensresponse>GetTokensResponse<a href=#gettokensresponse class=hash-link aria-label="Direct link to GetTokensResponse" title="Direct link to GetTokensResponse" translate=no></a></h3>
<blockquote>
<p><strong>GetTokensResponse</strong> = { <code>accessToken</code>: <code>string</code>; <code>idToken</code>: <code>string</code>; }</p>
</blockquote>
<h4 class="anchor anchorTargetStickyNavbar_Vzrq" id=properties-7>Properties<a href=#properties-7 class=hash-link aria-label="Direct link to Properties" title="Direct link to Properties" translate=no></a></h4>
<table><thead><tr><th>Property<th>Type<tbody><tr><td><a id=property-accesstoken></a> <code>accessToken</code><td><code>string</code><tr><td><a id=property-idtoken></a> <code>idToken</code><td><code>string</code></table>
<hr/>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id=hasplayservicesparams>HasPlayServicesParams<a href=#hasplayservicesparams class=hash-link aria-label="Direct link to HasPlayServicesParams" title="Direct link to HasPlayServicesParams" translate=no></a></h3>
<blockquote>
<p><strong>HasPlayServicesParams</strong> = { <code>showPlayServicesUpdateDialog?</code>: <code>boolean</code>; }</p>
</blockquote>
<h4 class="anchor anchorTargetStickyNavbar_Vzrq" id=properties-8>Properties<a href=#properties-8 class=hash-link aria-label="Direct link to Properties" title="Direct link to Properties" translate=no></a></h4>
<table><thead><tr><th>Property<th>Type<th>Description<tbody><tr><td><a id=property-showplayservicesupdatedialog></a> <code>showPlayServicesUpdateDialog?</code><td><code>boolean</code><td>Whether to show a dialog that prompts the user to install Google Play Services, if they don't have them installed. <strong>Default</strong> <code>true</code></table>
<hr/>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id=signinparams>SignInParams<a href=#signinparams class=hash-link aria-label="Direct link to SignInParams" title="Direct link to SignInParams" translate=no></a></h3>
<blockquote>
<p><strong>SignInParams</strong> = { <code>loginHint?</code>: <code>string</code>; <code>nonce?</code>: <code>string</code>; }</p>
</blockquote>
<h4 class="anchor anchorTargetStickyNavbar_Vzrq" id=properties-9>Properties<a href=#properties-9 class=hash-link aria-label="Direct link to Properties" title="Direct link to Properties" translate=no></a></h4>
<table><thead><tr><th>Property<th>Type<th>Description<tbody><tr><td><a id=property-loginhint></a> <code>loginHint?</code><td><code>string</code><td>iOS only. The user's ID, or email address, to be prefilled in the authentication UI if possible. <a href=https://developers.google.com/identity/sign-in/ios/reference/Classes/GIDSignIn#-signinwithpresentingviewcontroller:hint:completion: target=_blank rel="noopener noreferrer" class="">See docs here</a>.<tr><td><a id=property-nonce></a> <code>nonce?</code><td><code>string</code><td>iOS only. A cryptographically random value used to mitigate replay attacks. Only available in the paid version. For support across all platforms, use the Universal sign in module.</table>
<hr/>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id=signinresponse>SignInResponse<a href=#signinresponse class=hash-link aria-label="Direct link to SignInResponse" title="Direct link to SignInResponse" translate=no></a></h3>
<blockquote>
<p><strong>SignInResponse</strong> = <a href=#signinsuccessresponse class=""><code>SignInSuccessResponse</code></a> | <a href=#cancelledresponse class=""><code>CancelledResponse</code></a></p>
</blockquote>
<hr/>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id=signinsilentlyresponse>SignInSilentlyResponse<a href=#signinsilentlyresponse class=hash-link aria-label="Direct link to SignInSilentlyResponse" title="Direct link to SignInSilentlyResponse" translate=no></a></h3>
<blockquote>
<p><strong>SignInSilentlyResponse</strong> = <a href=#signinsuccessresponse class=""><code>SignInSuccessResponse</code></a> | <a href=#nosavedcredentialfound class=""><code>NoSavedCredentialFound</code></a></p>
</blockquote>
<p>The response object for calling <code>signInSilently</code>. Either the user details are available (without user interaction) or there was no saved credential found.</p>
<hr/>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id=signinsuccessresponse>SignInSuccessResponse<a href=#signinsuccessresponse class=hash-link aria-label="Direct link to SignInSuccessResponse" title="Direct link to SignInSuccessResponse" translate=no></a></h3>
<blockquote>
<p><strong>SignInSuccessResponse</strong> = { <code>data</code>: <a href=#user class=""><code>User</code></a>; <code>type</code>: <code>"success"</code>; }</p>
</blockquote>
<p>The response object when the user signs in successfully.</p>
<h4 class="anchor anchorTargetStickyNavbar_Vzrq" id=properties-10>Properties<a href=#properties-10 class=hash-link aria-label="Direct link to Properties" title="Direct link to Properties" translate=no></a></h4>
<table><thead><tr><th>Property<th>Type<th>Description<tbody><tr><td><a id=property-data-4></a> <code>data</code><td><a href=#user class=""><code>User</code></a><td>The user details.<tr><td><a id=property-type-4></a> <code>type</code><td><code>"success"</code><td>-</table>
<hr/>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id=user>User<a href=#user class=hash-link aria-label="Direct link to User" title="Direct link to User" translate=no></a></h3>
<blockquote>
<p><strong>User</strong> = { <code>idToken</code>: <code>string</code> | <code>null</code>; <code>scopes</code>: <code>string</code>[]; <code>serverAuthCode</code>: <code>string</code> | <code>null</code>; <code>user</code>: { <code>email</code>: <code>string</code>; <code>familyName</code>: <code>string</code> | <code>null</code>; <code>givenName</code>: <code>string</code> | <code>null</code>; <code>id</code>: <code>string</code>; <code>name</code>: <code>string</code> | <code>null</code>; <code>photo</code>: <code>string</code> | <code>null</code>; }; }</p>
</blockquote>
<h4 class="anchor anchorTargetStickyNavbar_Vzrq" id=properties-11>Properties<a href=#properties-11 class=hash-link aria-label="Direct link to Properties" title="Direct link to Properties" translate=no></a></h4>
<table><thead><tr><th>Property<th>Type<th>Description<tbody><tr><td><a id=property-idtoken-2></a> <code>idToken</code><td><code>string</code> | <code>null</code><td>JWT (JSON Web Token) that serves as a secure credential for your user's identity.<tr><td><a id=property-scopes-2></a> <code>scopes</code><td><code>string</code>[]<td>The Google API scopes that the user granted access to.<tr><td><a id=property-serverauthcode-1></a> <code>serverAuthCode</code><td><code>string</code> | <code>null</code><td>Code that you can securely send to your server to exchange for an access and refresh token. Use the access token to call Google APIs on behalf of the user and, optionally, store the refresh token to acquire a new access token when the access token expires. Not null only if a valid <code>webClientId</code> and <code>offlineAccess</code> was enabled in <code>configure()</code>.<tr><td><a id=property-user-1></a> <code>user</code><td>{ <code>email</code>: <code>string</code>; <code>familyName</code>: <code>string</code> | <code>null</code>; <code>givenName</code>: <code>string</code> | <code>null</code>; <code>id</code>: <code>string</code>; <code>name</code>: <code>string</code> | <code>null</code>; <code>photo</code>: <code>string</code> | <code>null</code>; }<td>-<tr><td><code>user.email</code><td><code>string</code><td>-<tr><td><code>user.familyName</code><td><code>string</code> | <code>null</code><td>-<tr><td><code>user.givenName</code><td><code>string</code> | <code>null</code><td>-<tr><td><code>user.id</code><td><code>string</code><td>-<tr><td><code>user.name</code><td><code>string</code> | <code>null</code><td>-<tr><td><code>user.photo</code><td><code>string</code> | <code>null</code><td>-</table>
<hr/>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id=googlesignin>GoogleSignin<a href=#googlesignin class=hash-link aria-label="Direct link to GoogleSignin" title="Direct link to GoogleSignin" translate=no></a></h3>
<blockquote>
<p><code>const</code> <strong>GoogleSignin</strong>: { <code>addScopes</code>: (<code>options</code>: <a href=#addscopesparams class=""><code>AddScopesParams</code></a>) => <code>Promise</code><<a href=#signinresponse class=""><code>SignInResponse</code></a> | <code>null</code>>; <code>clearCachedAccessToken</code>: (<code>tokenString</code>: <code>string</code>) => <code>Promise</code><<code>null</code>>; <code>configure</code>: (<code>options?</code>: <a href=#configureparams class=""><code>ConfigureParams</code></a>) => <code>void</code>; <code>enableAppCheck</code>: (<code>params?</code>: <a href=#enableappcheckparams class=""><code>EnableAppCheckParams</code></a>) => <code>Promise</code><<code>null</code>>; <code>getCurrentUser</code>: () => <a href=#user class=""><code>User</code></a> | <code>null</code>; <code>getTokens</code>: () => <code>Promise</code><<a href=#gettokensresponse class=""><code>GetTokensResponse</code></a>>; <code>hasPlayServices</code>: (<code>options?</code>: <a href=#hasplayservicesparams class=""><code>HasPlayServicesParams</code></a>) => <code>Promise</code><<code>boolean</code>>; <code>hasPreviousSignIn</code>: () => <code>boolean</code>; <code>revokeAccess</code>: () => <code>Promise</code><<code>null</code>>; <code>signIn</code>: (<code>options</code>: <a href=#signinparams class=""><code>SignInParams</code></a>) => <code>Promise</code><<a href=#signinresponse class=""><code>SignInResponse</code></a>>; <code>signInSilently</code>: () => <code>Promise</code><<a href=#signinsilentlyresponse class=""><code>SignInSilentlyResponse</code></a>>; <code>signOut</code>: () => <code>Promise</code><<code>null</code>>; }</p>
</blockquote>
<p>The entry point of the Google Sign In API, exposed as <code>GoogleSignin</code>.</p>
<h4 class="anchor anchorTargetStickyNavbar_Vzrq" id=type-declaration-6>Type Declaration<a href=#type-declaration-6 class=hash-link aria-label="Direct link to Type Declaration" title="Direct link to Type Declaration" translate=no></a></h4>
<table><thead><tr><th>Name<th>Type<tbody><tr><td><a id=property-addscopes></a> <code>addScopes()</code><td>(<code>options</code>: <a href=#addscopesparams class=""><code>AddScopesParams</code></a>) => <code>Promise</code><<a href=#signinresponse class=""><code>SignInResponse</code></a> | <code>null</code>><tr><td><a id=property-clearcachedaccesstoken-1></a> <code>clearCachedAccessToken()</code><td>(<code>tokenString</code>: <code>string</code>) => <code>Promise</code><<code>null</code>><tr><td><a id=property-configure-1></a> <code>configure()</code><td>(<code>options?</code>: <a href=#configureparams class=""><code>ConfigureParams</code></a>) => <code>void</code><tr><td><a id=property-enableappcheck-1></a> <code>enableAppCheck()</code><td>(<code>params?</code>: <a href=#enableappcheckparams class=""><code>EnableAppCheckParams</code></a>) => <code>Promise</code><<code>null</code>><tr><td><a id=property-getcurrentuser></a> <code>getCurrentUser()</code><td>() => <a href=#user class=""><code>User</code></a> | <code>null</code><tr><td><a id=property-gettokens></a> <code>getTokens()</code><td>() => <code>Promise</code><<a href=#gettokensresponse class=""><code>GetTokensResponse</code></a>><tr><td><a id=property-hasplayservices></a> <code>hasPlayServices()</code><td>(<code>options?</code>: <a href=#hasplayservicesparams class=""><code>HasPlayServicesParams</code></a>) => <code>Promise</code><<code>boolean</code>><tr><td><a id=property-hasprevioussignin></a> <code>hasPreviousSignIn()</code><td>() => <code>boolean</code><tr><td><a id=property-revokeaccess-1></a> <code>revokeAccess()</code><td>() => <code>Promise</code><<code>null</code>><tr><td><a id=property-signin-1></a> <code>signIn()</code><td>(<code>options</code>: <a href=#signinparams class=""><code>SignInParams</code></a>) => <code>Promise</code><<a href=#signinresponse class=""><code>SignInResponse</code></a>><tr><td><a id=property-signinsilently></a> <code>signInSilently()</code><td>() => <code>Promise</code><<a href=#signinsilentlyresponse class=""><code>SignInSilentlyResponse</code></a>><tr><td><a id=property-signout-1></a> <code>signOut()</code><td>() => <code>Promise</code><<code>null</code>></table>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id=constants>Constants<a href=#constants class=hash-link aria-label="Direct link to Constants" title="Direct link to Constants" translate=no></a></h2>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id=statuscodes>statusCodes<a href=#statuscodes class=hash-link aria-label="Direct link to statusCodes" title="Direct link to statusCodes" translate=no></a></h3>
<blockquote>
<p><code>const</code> <strong>statusCodes</strong>: <code>Readonly</code><{ <code>IN_PROGRESS</code>: <code>"IN_PROGRESS"</code>; <code>NULL_PRESENTER</code>: <code>"NULL_PRESENTER"</code>; <code>PLAY_SERVICES_NOT_AVAILABLE</code>: <code>"PLAY_SERVICES_NOT_AVAILABLE"</code>; }></p>
</blockquote>
<p>Read more about the meaning of the error codes in the <a class="" href=/docs/errors>guide</a>.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id=functions>Functions<a href=#functions class=hash-link aria-label="Direct link to Functions" title="Direct link to Functions" translate=no></a></h2>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id=iscancelledresponse>isCancelledResponse()<a href=#iscancelledresponse class=hash-link aria-label="Direct link to isCancelledResponse()" title="Direct link to isCancelledResponse()" translate=no></a></h3>
<blockquote>
<p><strong>isCancelledResponse</strong>(<code>response</code>: <a href=#onetapresponse class=""><code>OneTapResponse</code></a>): <code>response is CancelledResponse</code></p>
</blockquote>
<p>TypeScript helper to check if a response is a <code>cancelled</code> response. This is the same as checking if the <code>response.type === "cancelled"</code>.</p>
<p>Use this if you prefer to use a function instead of comparing with a raw string.</p>
<p>It supports both One Tap and Original Google Sign In responses.</p>
<h4 class="anchor anchorTargetStickyNavbar_Vzrq" id=parameters>Parameters<a href=#parameters class=hash-link aria-label="Direct link to Parameters" title="Direct link to Parameters" translate=no></a></h4>
<table><thead><tr><th>Parameter<th>Type<tbody><tr><td><code>response</code><td><a href=#onetapresponse class=""><code>OneTapResponse</code></a></table>
<h4 class="anchor anchorTargetStickyNavbar_Vzrq" id=returns>Returns<a href=#returns class=hash-link aria-label="Direct link to Returns" title="Direct link to Returns" translate=no></a></h4>
<p><code>response is CancelledResponse</code></p>
<h4 class="anchor anchorTargetStickyNavbar_Vzrq" id=example>Example<a href=#example class=hash-link aria-label="Direct link to Example" title="Direct link to Example" translate=no></a></h4>
<div class="language-ts codeBlockContainer_Ckt0 theme-code-block" style=--prism-color:#393A34;--prism-background-color:#f6f8fa><div class=codeBlockContent_QJqH><pre tabindex=0 class="prism-code language-ts codeBlock_bY9V thin-scrollbar" style=color:#393A34;background-color:#f6f8fa><code class=codeBlockLines_e6Vv><div class=token-line style=color:#393A34><span class="token keyword" style=color:#00009f>const</span><span class="token plain"> response </span><span class="token operator" style=color:#393A34>=</span><span class="token plain"> </span><span class="token keyword" style=color:#00009f>await</span><span class="token plain"> GoogleOneTapSignIn</span><span class="token punctuation" style=color:#393A34>.</span><span class="token function" style=color:#d73a49>createAccount</span><span class="token punctuation" style=color:#393A34>(</span><span class="token punctuation" style=color:#393A34>)</span><span class="token punctuation" style=color:#393A34>;</span><span class="token plain"></span><br/></div><div class=token-line style=color:#393A34><span class="token plain" style=display:inline-block></span><br/></div><div class=token-line style=color:#393A34><span class="token plain"></span><span class="token keyword" style=color:#00009f>if</span><span class="token plain"> </span><span class="token punctuation" style=color:#393A34>(</span><span class="token function" style=color:#d73a49>isCancelledResponse</span><span class="token punctuation" style=color:#393A34>(</span><span class="token plain">response</span><span class="token punctuation" style=color:#393A34>)</span><span class="token punctuation" style=color:#393A34>)</span><span class="token plain"> </span><span class="token punctuation" style=color:#393A34>{</span><span class="token plain"></span><br/></div><div class=token-line style=color:#393A34><span class="token plain"> </span><span class="token comment" style=color:#999988;font-style:italic>// handle cancelled response</span><span class="token plain"></span><br/></div><div class=token-line style=color:#393A34><span class="token plain"></span><span class="token punctuation" style=color:#393A34>}</span><br/></div></code></pre></div></div>
<hr/>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id=iserrorwithcode>isErrorWithCode()<a href=#iserrorwithcode class=hash-link aria-label="Direct link to isErrorWithCode()" title="Direct link to isErrorWithCode()" translate=no></a></h3>
<blockquote>
<p><strong>isErrorWithCode</strong>(<code>error</code>: <code>unknown</code>): <code>error is NativeModuleError</code></p>
</blockquote>
<p>TypeScript helper to check if an object has the <code>code</code> property.
This is used to avoid <code>as</code> casting when you access the <code>code</code> property on errors returned by the module.</p>
<h4 class="anchor anchorTargetStickyNavbar_Vzrq" id=parameters-1>Parameters<a href=#parameters-1 class=hash-link aria-label="Direct link to Parameters" title="Direct link to Parameters" translate=no></a></h4>
<table><thead><tr><th>Parameter<th>Type<tbody><tr><td><code>error</code><td><code>unknown</code></table>
<h4 class="anchor anchorTargetStickyNavbar_Vzrq" id=returns-1>Returns<a href=#returns-1 class=hash-link aria-label="Direct link to Returns" title="Direct link to Returns" translate=no></a></h4>
<p><code>error is NativeModuleError</code></p>
<hr/>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id=isnosavedcredentialfoundresponse>isNoSavedCredentialFoundResponse()<a href=#isnosavedcredentialfoundresponse class=hash-link aria-label="Direct link to isNoSavedCredentialFoundResponse()" title="Direct link to isNoSavedCredentialFoundResponse()" translate=no></a></h3>
<blockquote>
<p><strong>isNoSavedCredentialFoundResponse</strong>(<code>response</code>: <a href=#onetapresponse class=""><code>OneTapResponse</code></a>): <code>response is NoSavedCredentialFound</code></p>
</blockquote>
<p>TypeScript helper to check if a response is a <code>noSavedCredentialFound</code> response. This is the same as checking if the <code>response.type === "noSavedCredentialFound"</code>.</p>
<p>Use this if you prefer to use a function instead of comparing with a raw string.</p>
<p>It supports both One Tap and Original Google Sign In responses.</p>
<h4 class="anchor anchorTargetStickyNavbar_Vzrq" id=parameters-2>Parameters<a href=#parameters-2 class=hash-link aria-label="Direct link to Parameters" title="Direct link to Parameters" translate=no></a></h4>
<table><thead><tr><th>Parameter<th>Type<tbody><tr><td><code>response</code><td><a href=#onetapresponse class=""><code>OneTapResponse</code></a></table>
<h4 class="anchor anchorTargetStickyNavbar_Vzrq" id=returns-2>Returns<a href=#returns-2 class=hash-link aria-label="Direct link to Returns" title="Direct link to Returns" translate=no></a></h4>
<p><code>response is NoSavedCredentialFound</code></p>
<h4 class="anchor anchorTargetStickyNavbar_Vzrq" id=example-1>Example<a href=#example-1 class=hash-link aria-label="Direct link to Example" title="Direct link to Example" translate=no></a></h4>
<div class="language-ts codeBlockContainer_Ckt0 theme-code-block" style=--prism-color:#393A34;--prism-background-color:#f6f8fa><div class=codeBlockContent_QJqH><pre tabindex=0 class="prism-code language-ts codeBlock_bY9V thin-scrollbar" style=color:#393A34;background-color:#f6f8fa><code class=codeBlockLines_e6Vv><div class=token-line style=color:#393A34><span class="token keyword" style=color:#00009f>const</span><span class="token plain"> response </span><span class="token operator" style=color:#393A34>=</span><span class="token plain"> </span><span class="token keyword" style=color:#00009f>await</span><span class="token plain"> GoogleOneTapSignIn</span><span class="token punctuation" style=color:#393A34>.</span><span class="token function" style=color:#d73a49>signIn</span><span class="token punctuation" style=color:#393A34>(</span><span class="token punctuation" style=color:#393A34>)</span><span class="token punctuation" style=color:#393A34>;</span><span class="token plain"></span><br/></div><div class=token-line style=color:#393A34><span class="token plain" style=display:inline-block></span><br/></div><div class=token-line style=color:#393A34><span class="token plain"></span><span class="token keyword" style=color:#00009f>if</span><span class="token plain"> </span><span class="token punctuation" style=color:#393A34>(</span><span class="token function" style=color:#d73a49>isNoSavedCredentialFoundResponse</span><span class="token punctuation" style=color:#393A34>(</span><span class="token plain">response</span><span class="token punctuation" style=color:#393A34>)</span><span class="token punctuation" style=color:#393A34>)</span><span class="token plain"> </span><span class="token punctuation" style=color:#393A34>{</span><span class="token plain"></span><br/></div><div class=token-line style=color:#393A34><span class="token plain"> </span><span class="token comment" style=color:#999988;font-style:italic>// the case when no user was previously signed in</span><span class="token plain"></span><br/></div><div class=token-line style=color:#393A34><span class="token plain"></span><span class="token punctuation" style=color:#393A34>}</span><br/></div></code></pre></div></div>
<hr/>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id=issuccessresponse>isSuccessResponse()<a href=#issuccessresponse class=hash-link aria-label="Direct link to isSuccessResponse()" title="Direct link to isSuccessResponse()" translate=no></a></h3>
<blockquote>
<p><strong>isSuccessResponse</strong>(<code>response</code>: <a href=#onetapresponse class=""><code>OneTapResponse</code></a>): <code>response is OneTapSuccessResponse</code></p>
</blockquote>
<p>TypeScript helper to check if a response is a <code>cancelled</code> response. This is the same as checking if the <code>response.type === "cancelled"</code>.</p>
<p>Use this if you prefer to use a function instead of comparing with a raw string.</p>
<p>It supports both One Tap and Original Google Sign In responses.</p>
<h4 class="anchor anchorTargetStickyNavbar_Vzrq" id=parameters-3>Parameters<a href=#parameters-3 class=hash-link aria-label="Direct link to Parameters" title="Direct link to Parameters" translate=no></a></h4>
<table><thead><tr><th>Parameter<th>Type<tbody><tr><td><code>response</code><td><a href=#onetapresponse class=""><code>OneTapResponse</code></a></table>
<h4 class="anchor anchorTargetStickyNavbar_Vzrq" id=returns-3>Returns<a href=#returns-3 class=hash-link aria-label="Direct link to Returns" title="Direct link to Returns" translate=no></a></h4>
<p><code>response is OneTapSuccessResponse</code></p>
<h4 class="anchor anchorTargetStickyNavbar_Vzrq" id=example-2>Example<a href=#example-2 class=hash-link aria-label="Direct link to Example" title="Direct link to Example" translate=no></a></h4>
<div class="language-ts codeBlockContainer_Ckt0 theme-code-block" style=--prism-color:#393A34;--prism-background-color:#f6f8fa><div class=codeBlockContent_QJqH><pre tabindex=0 class="prism-code language-ts codeBlock_bY9V thin-scrollbar" style=color:#393A34;background-color:#f6f8fa><code class=codeBlockLines_e6Vv><div class=token-line style=color:#393A34><span class="token keyword" style=color:#00009f>const</span><span class="token plain"> response </span><span class="token operator" style=color:#393A34>=</span><span class="token plain"> </span><span class="token keyword" style=color:#00009f>await</span><span class="token plain"> GoogleOneTapSignIn</span><span class="token punctuation" style=color:#393A34>.</span><span class="token function" style=color:#d73a49>createAccount</span><span class="token punctuation" style=color:#393A34>(</span><span class="token punctuation" style=color:#393A34>)</span><span class="token punctuation" style=color:#393A34>;</span><span class="token plain"></span><br/></div><div class=token-line style=color:#393A34><span class="token plain" style=display:inline-block></span><br/></div><div class=token-line style=color:#393A34><span class="token plain"></span><span class="token keyword" style=color:#00009f>if</span><span class="token plain"> </span><span class="token punctuation" style=color:#393A34>(</span><span class="token function" style=color:#d73a49>isSuccessResponse</span><span class="token punctuation" style=color:#393A34>(</span><span class="token plain">response</span><span class="token punctuation" style=color:#393A34>)</span><span class="token punctuation" style=color:#393A34>)</span><span class="token plain"> </span><span class="token punctuation" style=color:#393A34>{</span><span class="token plain"></span><br/></div><div class=token-line style=color:#393A34><span class="token plain"> </span><span class="token comment" style=color:#999988;font-style:italic>// handle user signed in</span><span class="token plain"></span><br/></div><div class=token-line style=color:#393A34><span class="token plain"></span><span class="token punctuation" style=color:#393A34>}</span><br/></div></code></pre></div></div>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id=react-components>React Components<a href=#react-components class=hash-link aria-label="Direct link to React Components" title="Direct link to React Components" translate=no></a></h2>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id=googlelogobuttonprops>GoogleLogoButtonProps<a href=#googlelogobuttonprops class=hash-link aria-label="Direct link to GoogleLogoButtonProps" title="Direct link to GoogleLogoButtonProps" translate=no></a></h3>
<blockquote>
<p><strong>GoogleLogoButtonProps</strong> = { <code>label?</code>: <code>string</code>; <code>shape?</code>: <code>"rectangular"</code> | <code>"circular"</code>; <code>textStyle?</code>: <code>StyleProp</code><<code>TextStyle</code>>; <code>theme?</code>: <code>"light"</code> | <code>"dark"</code> | <code>"neutral"</code>; <code>variant?</code>: <code>"standard"</code> | <code>"icon"</code>; }</p>
</blockquote>
<h4 class="anchor anchorTargetStickyNavbar_Vzrq" id=properties-12>Properties<a href=#properties-12 class=hash-link aria-label="Direct link to Properties" title="Direct link to Properties" translate=no></a></h4>
<table><thead><tr><th>Property<th>Type<th>Description<tbody><tr><td><a id=property-label></a> <code>label?</code><td><code>string</code><td>-<tr><td><a id=property-shape></a> <code>shape?</code><td><code>"rectangular"</code> | <code>"circular"</code><td>-<tr><td><a id=property-textstyle></a> <code>textStyle?</code><td><code>StyleProp</code><<code>TextStyle</code>><td>Style for the button text. Provide the Roboto font family with a weight of 500.<tr><td><a id=property-theme></a> <code>theme?</code><td><code>"light"</code> | <code>"dark"</code> | <code>"neutral"</code><td>-<tr><td><a id=property-variant></a> <code>variant?</code><td><code>"standard"</code> | <code>"icon"</code><td>-</table>
<hr/>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id=googlesigninbuttonprops>GoogleSigninButtonProps<a href=#googlesigninbuttonprops class=hash-link aria-label="Direct link to GoogleSigninButtonProps" title="Direct link to GoogleSigninButtonProps" translate=no></a></h3>
<blockquote>
<p><strong>GoogleSigninButtonProps</strong> = <code>ViewProps</code> & { <code>color?</code>: <code>"dark"</code> | <code>"light"</code>; <code>disabled?</code>: <code>boolean</code>; <code>onPress?</code>: () => <code>void</code>; <code>size?</code>: <code>number</code>; }</p>
</blockquote>
<h4 class="anchor anchorTargetStickyNavbar_Vzrq" id=type-declaration-7>Type Declaration<a href=#type-declaration-7 class=hash-link aria-label="Direct link to Type Declaration" title="Direct link to Type Declaration" translate=no></a></h4>
<table><thead><tr><th>Name<th>Type<tbody><tr><td><code>color?</code><td><code>"dark"</code> | <code>"light"</code><tr><td><code>disabled?</code><td><code>boolean</code><tr><td><code>onPress()?</code><td>() => <code>void</code><tr><td><code>size?</code><td><code>number</code></table>
<hr/>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id=webgooglesigninbuttonprops>WebGoogleSignInButtonProps<a href=#webgooglesigninbuttonprops class=hash-link aria-label="Direct link to WebGoogleSignInButtonProps" title="Direct link to WebGoogleSignInButtonProps" translate=no></a></h3>
<blockquote>
<p><strong>WebGoogleSignInButtonProps</strong> = <code>Omit</code><<code>GsiButtonConfiguration</code>, <code>"logo_alignment"</code>> & { <code>logoAlignment?</code>: <code>GsiButtonConfiguration</code>[<code>"logo_alignment"</code>]; <code>onError?</code>: (<code>error</code>: <code>Error</code>) => <code>void</code>; }</p>
</blockquote>
<h4 class="anchor anchorTargetStickyNavbar_Vzrq" id=type-declaration-8>Type Declaration<a href=#type-declaration-8 class=hash-link aria-label="Direct link to Type Declaration" title="Direct link to Type Declaration" translate=no></a></h4>
<table><thead><tr><th>Name<th>Type<tbody><tr><td><code>logoAlignment?</code><td><code>GsiButtonConfiguration</code>[<code>"logo_alignment"</code>]<tr><td><code>onError()?</code><td>(<code>error</code>: <code>Error</code>) => <code>void</code></table>
<hr/>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id=googlelogobutton>GoogleLogoButton<a href=#googlelogobutton class=hash-link aria-label="Direct link to GoogleLogoButton" title="Direct link to GoogleLogoButton" translate=no></a></h3>
<blockquote>
<p><code>const</code> <strong>GoogleLogoButton</strong>: <code>React.FC</code><<code>PressableProps</code> & <a href=#googlelogobuttonprops class=""><code>GoogleLogoButtonProps</code></a>></p>
</blockquote>
<p>Sign in button that follows the <a href=https://developers.google.com/identity/branding-guidelines target=_blank rel="noopener noreferrer" class="">Google branding guidelines</a>.</p>
<hr/>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id=webgooglesigninbutton>WebGoogleSigninButton<a href=#webgooglesigninbutton class=hash-link aria-label="Direct link to WebGoogleSigninButton" title="Direct link to WebGoogleSigninButton" translate=no></a></h3>
<blockquote>
<p><code>const</code> <strong>WebGoogleSigninButton</strong>: <code>React.FC</code><<a href=#webgooglesigninbuttonprops class=""><code>WebGoogleSignInButtonProps</code></a>></p>
</blockquote>
<hr/>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id=googlesigninbutton>GoogleSigninButton()<a href=#googlesigninbutton class=hash-link aria-label="Direct link to GoogleSigninButton()" title="Direct link to GoogleSigninButton()" translate=no></a></h3>
<blockquote>
<p><strong>GoogleSigninButton</strong>(<code>props</code>: <a href=#googlesigninbuttonprops class=""><code>GoogleSigninButtonProps</code></a>): <code>Element</code></p>
</blockquote>
<p>Native Google Sign-In button component. Prefer using the <a href=#googlelogobutton class=""><code>GoogleLogoButton</code></a> for a more customizable button.</p>
<h4 class="anchor anchorTargetStickyNavbar_Vzrq" id=parameters-4>Parameters<a href=#parameters-4 class=hash-link aria-label="Direct link to Parameters" title="Direct link to Parameters" translate=no></a></h4>
<table><thead><tr><th>Parameter<th>Type<tbody><tr><td><code>props</code><td><a href=#googlesigninbuttonprops class=""><code>GoogleSigninButtonProps</code></a></table>
<h4 class="anchor anchorTargetStickyNavbar_Vzrq" id=returns-4>Returns<a href=#returns-4 class=hash-link aria-label="Direct link to Returns" title="Direct link to Returns" translate=no></a></h4>
<p><code>Element</code></p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id=type-aliases>Type Aliases<a href=#type-aliases class=hash-link aria-label="Direct link to Type Aliases" title="Direct link to Type Aliases" translate=no></a></h2>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id=authorizationprompt>AuthorizationPrompt<a href=#authorizationprompt class=hash-link aria-label="Direct link to AuthorizationPrompt" title="Direct link to AuthorizationPrompt" translate=no></a></h3>
<blockquote>
<p><strong>AuthorizationPrompt</strong> = <code>"consent"</code> | <code>"select_account"</code></p>
</blockquote>
<hr/>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id=cancelledresponse>CancelledResponse<a href=#cancelledresponse class=hash-link aria-label="Direct link to CancelledResponse" title="Direct link to CancelledResponse" translate=no></a></h3>
<blockquote>
<p><strong>CancelledResponse</strong> = { <code>data</code>: <code>null</code>; <code>type</code>: <code>"cancelled"</code>; }</p>
</blockquote>
<p>The response object when the user cancels the flow for any operation that requires user interaction.</p>
<p>On the web, this is also returned while <a href=https://developers.google.com/identity/gsi/web/guides/features#exponential_cooldown target=_blank rel="noopener noreferrer" class="">cooldown period</a> is active.
Detecting the cooldown period itself is not possible on the web for user privacy reasons.</p>
<h4 class="anchor anchorTargetStickyNavbar_Vzrq" id=properties-13>Properties<a href=#properties-13 class=hash-link aria-label="Direct link to Properties" title="Direct link to Properties" translate=no></a></h4>
<table><thead><tr><th>Property<th>Type<tbody><tr><td><a id=property-data-1></a> <code>data</code><td><code>null</code><tr><td><a id=property-type-1></a> <code>type</code><td><code>"cancelled"</code></table>
<hr/>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id=clientidorplistpath>ClientIdOrPlistPath<a href=#clientidorplistpath class=hash-link aria-label="Direct link to ClientIdOrPlistPath" title="Direct link to ClientIdOrPlistPath" translate=no></a></h3>
<blockquote>
<p><strong>ClientIdOrPlistPath</strong> = { <code>iosClientId?</code>: <code>string</code>; } | { <code>googleServicePlistPath?</code>: <code>string</code>; }</p>
</blockquote>
<p>iOS only. Configures the iOS client ID. By default, the iOS client ID is taken from the <code>GoogleService-Info.plist</code> Firebase config file (if present).</p>
<p>You can specify a different bundle path for the config file, e.g. "GoogleService-Info-Staging".</p>
<p>Alternatively, set the client ID explicitly by providing <code>iosClientId</code>.</p>
<h4 class="anchor anchorTargetStickyNavbar_Vzrq" id=union-members>Union Members<a href=#union-members class=hash-link aria-label="Direct link to Union Members" title="Direct link to Union Members" translate=no></a></h4>
<h5 class="anchor anchorTargetStickyNavbar_Vzrq" id=type-literal>Type Literal<a href=#type-literal class=hash-link aria-label="Direct link to Type Literal" title="Direct link to Type Literal" translate=no></a></h5>
<p>{ <code>iosClientId?</code>: <code>string</code>; }</p>
<table><thead><tr><th>Name<th>Type<th>Description<tbody><tr><td><code>iosClientId?</code><td><code>string</code><td>If you want to specify the client ID of type iOS. It is taken from the <code>GoogleService-Info.plist</code> file by default.</table>
<hr/>
<h5 class="anchor anchorTargetStickyNavbar_Vzrq" id=type-literal-1>Type Literal<a href=#type-literal-1 class=hash-link aria-label="Direct link to Type Literal" title="Direct link to Type Literal" translate=no></a></h5>
<p>{ <code>googleServicePlistPath?</code>: <code>string</code>; }</p>
<table><thead><tr><th>Name<th>Type<th>Description<tbody><tr><td><code>googleServicePlistPath?</code><td><code>string</code><td>iOS only. Use this to specify a different bundle path name for the <code>GoogleService-Info</code> Firebase config file. <strong>Example</strong> <code>"GoogleService-Info-Staging"</code></table>
<hr/>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id=nosavedcredentialfound>NoSavedCredentialFound<a href=#nosavedcredentialfound class=hash-link aria-label="Direct link to NoSavedCredentialFound" title="Direct link to NoSavedCredentialFound" translate=no></a></h3>
<blockquote>
<p><strong>NoSavedCredentialFound</strong> = { <code>data</code>: <code>null</code>; <code>type</code>: <code>"noSavedCredentialFound"</code>; }</p>
</blockquote>
<p>The response to calling One Tap's <code>signIn</code> and Original Google Sign In's <code>signInSilently</code> when no user was previously signed in, or they have since signed out or revoked access.</p>
<h4 class="anchor anchorTargetStickyNavbar_Vzrq" id=properties-14>Properties<a href=#properties-14 class=hash-link aria-label="Direct link to Properties" title="Direct link to Properties" translate=no></a></h4>
<table><thead><tr><th>Property<th>Type<tbody><tr><td><a id=property-data-2></a> <code>data</code><td><code>null</code><tr><td><a id=property-type-2></a> <code>type</code><td><code>"noSavedCredentialFound"</code></table>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id=web-universal-sign-in-module>Web Universal sign in module<a href=#web-universal-sign-in-module class=hash-link aria-label="Direct link to Web Universal sign in module" title="Direct link to Web Universal sign in module" translate=no></a></h2>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id=webonetapsignincallbacks>WebOneTapSignInCallbacks<a href=#webonetapsignincallbacks class=hash-link aria-label="Direct link to WebOneTapSignInCallbacks" title="Direct link to WebOneTapSignInCallbacks" translate=no></a></h3>
<blockquote>
<p><strong>WebOneTapSignInCallbacks</strong> = { <code>momentListener?</code>: <code>MomentListener</code>; <code>onError</code>: (<code>error</code>: <code>NativeModuleError</code>) => <code>void</code> | <code>Promise</code><<code>void</code>>; <code>onResponse</code>: (<code>userInfo</code>: <a href=#onetapexplicitsigninresponse class=""><code>OneTapExplicitSignInResponse</code></a>) => <code>void</code> | <code>Promise</code><<code>void</code>>; }</p>
</blockquote>
<p>When using Universal sign in on the web, the sign in result is delivered via a callback, not via a promise.
The shape of data delivered to the callback is the same as the shape of the data in the promise, enabling code reuse.
Read more in the <a class="" href=/docs/one-tap#web-support>guide</a>.</p>
<h4 class="anchor anchorTargetStickyNavbar_Vzrq" id=properties-15>Properties<a href=#properties-15 class=hash-link aria-label="Direct link to Properties" title="Direct link to Properties" translate=no></a></h4>
<table><thead><tr><th>Property<th>Type<th>Description<tbody><tr><td><a id=property-momentlistener></a> <code>momentListener?</code><td><code>MomentListener</code><td>A callback function that is called when important events take place. See <a href=https://developers.google.com/identity/gsi/web/reference/js-reference#PromptMomentNotification target=_blank rel="noopener noreferrer" class="">reference</a>.<tr><td><a id=property-onerror></a> <code>onError</code><td>(<code>error</code>: <code>NativeModuleError</code>) => <code>void</code> | <code>Promise</code><<code>void</code>><td>Called when an error occurs. You can use the <code>code</code> property of the error to determine the reason for the error. The reported errors on the web are in the same format as the errors reported on the native platforms, so you can reuse your error handling code.<tr><td><a id=property-onresponse></a> <code>onResponse</code><td>(<code>userInfo</code>: <a href=#onetapexplicitsigninresponse class=""><code>OneTapExplicitSignInResponse</code></a>) => <code>void</code> | <code>Promise</code><<code>void</code>><td>Called when the user successfully signs in, or cancels the sign in, either using the web One-tap flow or the button flow.</table></div><footer class="theme-doc-footer docusaurus-mt-lg"><div class="row margin-top--sm theme-doc-footer-edit-meta-row"><div class="col noPrint_WFHX"><a href=https://github.com/react-native-google-signin/docs/edit/main/docs/api/index.mdx target=_blank rel="noopener noreferrer" class=theme-edit-this-page><svg fill=currentColor height=20 width=20 viewBox="0 0 40 40" class=iconEdit_Z9Sw aria-hidden=true><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"/></g></svg>Edit this page</a></div><div class="col lastUpdated_JAkA"></div></div></footer></article><nav class="docusaurus-mt-lg pagination-nav" aria-label="Docs pages"></nav></div></div><div class="col col--3"><div class="tableOfContents_bqdL thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href=#universal-sign-in-module class="table-of-contents__link toc-highlight">Universal sign in module</a><ul><li><a href=#authorizationresponse class="table-of-contents__link toc-highlight">AuthorizationResponse</a><li><a href=#authorizationsuccessresponse class="table-of-contents__link toc-highlight">AuthorizationSuccessResponse</a><li><a href=#enableappcheckparams class="table-of-contents__link toc-highlight">EnableAppCheckParams</a><li><a href=#onetapconfigureparams class="table-of-contents__link toc-highlight">OneTapConfigureParams</a><li><a href=#onetapcreateaccountparams class="table-of-contents__link toc-highlight">OneTapCreateAccountParams</a><li><a href=#onetapexplicitsigninparams class="table-of-contents__link toc-highlight">OneTapExplicitSignInParams</a><li><a href=#onetapexplicitsigninresponse class="table-of-contents__link toc-highlight">OneTapExplicitSignInResponse</a><li><a href=#onetapresponse class="table-of-contents__link toc-highlight">OneTapResponse</a><li><a href=#onetapsigninparams class="table-of-contents__link toc-highlight">OneTapSignInParams</a><li><a href=#onetapsuccessresponse class="table-of-contents__link toc-highlight">OneTapSuccessResponse</a><li><a href=#onetapuser class="table-of-contents__link toc-highlight">OneTapUser</a><li><a href=#playservicesinfo class="table-of-contents__link toc-highlight">PlayServicesInfo</a><li><a href=#requestauthorizationparams class="table-of-contents__link toc-highlight">RequestAuthorizationParams</a><li><a href=#googleonetapsignin class="table-of-contents__link toc-highlight">GoogleOneTapSignIn</a></ul><li><a href=#original-google-sign-in class="table-of-contents__link toc-highlight">Original Google sign in</a><ul><li><a href=#addscopesparams class="table-of-contents__link toc-highlight">AddScopesParams</a><li><a href=#configureparams class="table-of-contents__link toc-highlight">ConfigureParams</a><li><a href=#gettokensresponse class="table-of-contents__link toc-highlight">GetTokensResponse</a><li><a href=#hasplayservicesparams class="table-of-contents__link toc-highlight">HasPlayServicesParams</a><li><a href=#signinparams class="table-of-contents__link toc-highlight">SignInParams</a><li><a href=#signinresponse class="table-of-contents__link toc-highlight">SignInResponse</a><li><a href=#signinsilentlyresponse class="table-of-contents__link toc-highlight">SignInSilentlyResponse</a><li><a href=#signinsuccessresponse class="table-of-contents__link toc-highlight">SignInSuccessResponse</a><li><a href=#user class="table-of-contents__link toc-highlight">User</a><li><a href=#googlesignin class="table-of-contents__link toc-highlight">GoogleSignin</a></ul><li><a href=#constants class="table-of-contents__link toc-highlight">Constants</a><ul><li><a href=#statuscodes class="table-of-contents__link toc-highlight">statusCodes</a></ul><li><a href=#functions class="table-of-contents__link toc-highlight">Functions</a><ul><li><a href=#iscancelledresponse class="table-of-contents__link toc-highlight">isCancelledResponse()</a><li><a href=#iserrorwithcode class="table-of-contents__link toc-highlight">isErrorWithCode()</a><li><a href=#isnosavedcredentialfoundresponse class="table-of-contents__link toc-highlight">isNoSavedCredentialFoundResponse()</a><li><a href=#issuccessresponse class="table-of-contents__link toc-highlight">isSuccessResponse()</a></ul><li><a href=#react-components class="table-of-contents__link toc-highlight">React Components</a><ul><li><a href=#googlelogobuttonprops class="table-of-contents__link toc-highlight">GoogleLogoButtonProps</a><li><a href=#googlesigninbuttonprops class="table-of-contents__link toc-highlight">GoogleSigninButtonProps</a><li><a href=#webgooglesigninbuttonprops class="table-of-contents__link toc-highlight">WebGoogleSignInButtonProps</a><li><a href=#googlelogobutton class="table-of-contents__link toc-highlight">GoogleLogoButton</a><li><a href=#webgooglesigninbutton class="table-of-contents__link toc-highlight">WebGoogleSigninButton</a><li><a href=#googlesigninbutton class="table-of-contents__link toc-highlight">GoogleSigninButton()</a></ul><li><a href=#type-aliases class="table-of-contents__link toc-highlight">Type Aliases</a><ul><li><a href=#authorizationprompt class="table-of-contents__link toc-highlight">AuthorizationPrompt</a><li><a href=#cancelledresponse class="table-of-contents__link toc-highlight">CancelledResponse</a><li><a href=#clientidorplistpath class="table-of-contents__link toc-highlight">ClientIdOrPlistPath</a><li><a href=#nosavedcredentialfound class="table-of-contents__link toc-highlight">NoSavedCredentialFound</a></ul><li><a href=#web-universal-sign-in-module class="table-of-contents__link toc-highlight">Web Universal sign in module</a><ul><li><a href=#webonetapsignincallbacks class="table-of-contents__link toc-highlight">WebOneTapSignInCallbacks</a></ul></ul></div></div></div></div></main></div></div></div><footer class="theme-layout-footer footer footer--dark"><div class="container container-fluid"><div class="footer__bottom text--center"><div class=footer__copyright>Copyright © 2026 <a href=https://universal-sign-in.com/>universal-sign-in.com</a></div></div></div></footer></div></body>