Skip to content

Commit 3f41b3b

Browse files
authored
docs: rename Modern to Universal (#53)
1 parent 0469c22 commit 3f41b3b

23 files changed

+212
-237
lines changed

docs/_oneTapModuleTable.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
> `const` **GoogleOneTapSignIn**: complex type, see below
22
3-
The entry point of the Modern Sign In API, exposed as `GoogleOneTapSignIn`.
3+
The entry point of the Universal sign in API, exposed as `GoogleOneTapSignIn`.
44

55
On the web, the signatures of `signIn`, `presentExplicitSignIn`, and `createAccount` are callback-based and on native they are Promise-based. Read more in the [guide](/docs/one-tap#web-support).
66

docs/_sponsorBanner.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
:::tip
2+
The functionality covered in this page is available in the licensed
3+
version. [You can get a license here](https://rngs-package.com/#pricing) ⭐️.
4+
:::

docs/api/index.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# API reference
22

3-
## Modern sign in module
3+
## Universal sign in module
44

55
### AuthorizationResponse
66

@@ -61,7 +61,7 @@ Parameters for enabling [App Check](/docs/security#appcheck). Provide `debugProv
6161
| `openIdRealm`? | `string` | 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. |
6262
| `profileImageSize`? | `number` | iOS only. The desired height and width of the profile image. **Default** `120px` |
6363
| `scopes`? | `string`[] | iOS only. The Google API scopes to request access to. Use `requestAuthorization` to request additional scopes on Android. **Default** `["email", "profile"]` |
64-
| `webClientId` | `WebClientId` | The web client ID obtained from Google Cloud console. In the Modern module only, pass `autoDetect` to automatically determine the value from Firebase config file. |
64+
| `webClientId` | `WebClientId` | The web client ID obtained from Google Cloud console. In the Universal module only, pass `autoDetect` to automatically determine the value from Firebase config file. |
6565

6666
---
6767

@@ -194,7 +194,7 @@ Learn more in the [guide](/docs/one-tap#requestauthorization).
194194

195195
> `const` **GoogleOneTapSignIn**: complex type, see below
196196
197-
The entry point of the Modern Sign In API, exposed as `GoogleOneTapSignIn`.
197+
The entry point of the Universal sign in API, exposed as `GoogleOneTapSignIn`.
198198

199199
On the web, the signatures of `signIn`, `presentExplicitSignIn`, and `createAccount` are callback-based and on native they are Promise-based. Read more in the [guide](/docs/one-tap#web-support).
200200

@@ -278,7 +278,7 @@ On the web, the signatures of `signIn`, `presentExplicitSignIn`, and `createAcco
278278
| Name | Type | Description |
279279
| ------------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
280280
| `loginHint`? | `string` | iOS only. The user's ID, or email address, to be prefilled in the authentication UI if possible. [See docs here](https://developers.google.com/identity/sign-in/ios/reference/Classes/GIDSignIn#-signinwithpresentingviewcontroller:hint:completion:). |
281-
| `nonce`? | `string` | iOS only. A cryptographically random value used to mitigate replay attacks. Only available in the paid version. For support across all platforms, use the Modern sign in module. |
281+
| `nonce`? | `string` | 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. |
282282

283283
---
284284

@@ -592,13 +592,13 @@ The response to calling One Tap's `signIn` and Original Google Sign In's `signIn
592592
| `data` | `null` |
593593
| `type` | `"noSavedCredentialFound"` |
594594

595-
## Web Modern sign in module
595+
## Web Universal sign in module
596596

597597
### WebOneTapSignInCallbacks
598598

599599
> **WebOneTapSignInCallbacks**: \{`momentListener`: `MomentListener`;`onError`: (`error`: `NativeModuleError`) => `void` \| `Promise`\<`void`\>;`onResponse`: (`userInfo`: [`OneTapExplicitSignInResponse`](index.mdx#onetapexplicitsigninresponse)) => `void` \| `Promise`\<`void`\>; \}
600600
601-
When using Modern sign in on the web, the sign in result is delivered via a callback, not via a promise.
601+
When using Universal sign in on the web, the sign in result is delivered via a callback, not via a promise.
602602
The shape of data delivered to the callback is the same as the shape of the data in the promise, enabling code reuse.
603603
Read more in the [guide](/docs/one-tap#web-support).
604604

docs/buttons/web.md renamed to docs/buttons/web.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
This is the sign-in button that you can use in web apps. It renders `null` when used in native apps.
44
It has a slightly different API than the native `GoogleSigninButton` component which is why it exists as a separate component.
55

6-
:::tip
7-
Web support is only available in the paid version. [It takes just a few clicks to get access](/docs/install.mdx#obtaining-access) ❤️.
8-
:::
6+
import Banner from '../_sponsorBanner.mdx';
7+
8+
<Banner />
99

1010
The button will _not render_ before the [Google Client API has been loaded](../setting-up/web). You can use the `onError` prop to detect this case.
1111

1212
### How to use this
1313

14-
As the Modern Sign In Guide explains, there are two ways to sign in on the web: using the One-tap UI or using the Google Sign-In button.
14+
As the Universal sign in Guide explains, there are two ways to sign in on the web: using the One-tap UI or using the Google Sign-In button.
1515

1616
One-tap UI may not always be available: This happens if user has [opted out](https://developers.google.com/identity/gsi/web/guides/features#globally_opt_out) or when they close the dialog several times in a row, entering the [cooldown period](https://developers.google.com/identity/gsi/web/guides/features#exponential_cooldown).
1717

docs/errors.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ See [example usage](original#signin).
4545
| `IN_PROGRESS` | Trying to invoke another operation (e.g. `signInSilently`) when previous one has not yet finished. If you call e.g. `signInSilently` twice, two calls to `signInSilently` in the native module will be done. The promise from the first call to `signInSilently` will be rejected with this error, and the second will resolve / reject with the result of the native call. |
4646
| `PLAY_SERVICES_NOT_AVAILABLE` | Play services are not available or outdated. This happens on Android, or on the web when you're calling the exposed APIs [before the Client library is loaded](setting-up/web). |
4747

48-
### Status codes specific to Modern sign in {#modern-status-codes}
48+
### Status codes specific to Universal sign in {#universal-status-codes}
4949

50-
| Name | Description |
51-
| ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
52-
| `ONE_TAP_START_FAILED` | Thrown only on Android when the Modern sign in UI cannot be presented. This happens during the [cooldown period](https://developers.google.com/identity/gsi/web/guides/features#exponential_cooldown). You can still call `presentExplicitSignIn` in that case. |
50+
| Name | Description |
51+
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
52+
| `ONE_TAP_START_FAILED` | Thrown only on Android when the Universal sign in UI cannot be presented. This happens during the [cooldown period](https://developers.google.com/identity/gsi/web/guides/features#exponential_cooldown). You can still call `presentExplicitSignIn` in that case. |
5353

5454
See [example usage](one-tap#signin).

docs/install.mdx

Lines changed: 29 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -8,47 +8,52 @@ There are two ways to consume the package:
88

99
[//]: # '🌟'
1010

11-
### Modern version {#sponsor-only-version}
11+
### Universal Sign In {#sponsor-only-version}
1212

13-
Available through purchasing a license, and to Expo customers, this version includes:
13+
⭐️ **Key Features**:
1414

15-
⚡️[**Modern Sign In**](/docs/one-tap) implemented with:
15+
- **Cross-Platform**: Unified API which works on **Android**, **iOS**, **Web**, and **macOS**.
1616

17-
- Android: latest [Credential Manager library](https://developers.google.com/identity/android-credential-manager)
18-
- Web: [Sign In with Google for Web](https://developers.google.com/identity/gsi/web/guides/features)
19-
- iOS & macOS: [Google Sign-In SDK](https://developers.google.com/identity/sign-in/ios/start)
17+
- Android: Built with [Credential Manager library](https://developers.google.com/identity/android-credential-manager)
18+
- Web: Uses [Sign In with Google for Web](https://developers.google.com/identity/gsi/web/guides/features)
19+
- iOS & macOS: Powered by the [Google Sign-In SDK](https://developers.google.com/identity/sign-in/ios/start)
20+
21+
- **Licensed:** see [pricing](https://rngs-package.com/#pricing) and [license](https://rngs-package.com/license).
22+
- **Trusted**: Over 130k npm package downloads.
23+
- **See the UI**: [screenshots](screenshots) of the features.
24+
- **Faster Sign-Ups**: Reduce sign-up and sign-in times on Android by up to 50%, according to [Google](https://developer.android.com/identity/sign-in/legacy-gsi-migration#authentication).
2025

2126
🛡️ **Advanced [security features](/docs/security)**
2227

23-
🔧 **Easier configuration** - [some parameters can be detected automatically](one-tap#automatic-config)
28+
🔧 **Easier setup** - Automatic detection of [configuration parameters](one-tap#automatic-config) for faster integration.
2429

25-
🖥️ **Full platform support** - Deploy everywhere with a unified api: Android, iOS, Web, and macOS
30+
[//]: # '🖥️ **Unified API** - Write code once, deploy everywhere.'
2631

27-
**An example app** - to showcase all **Modern Sign In** features
32+
📱 **An example app** - to showcase all Universal sign in features
2833

29-
Your support helps improve the module and upstream SDKs (such as [1](https://github.com/openid/AppAuth-iOS/pull/788), [2](https://github.com/google/GoogleSignIn-iOS/pull/402)).
34+
Your purchase enables improvements in the module and upstream SDKs (such as [1](https://github.com/openid/AppAuth-iOS/pull/788), [2](https://github.com/google/GoogleSignIn-iOS/pull/402)).
3035

3136
### Public version
3237

3338
Available on the public npm registry, this version:
3439

3540
- Has platform support limited to Android and iOS.
36-
- Uses functional, but deprecated [Legacy Android Google Sign-In](https://web.archive.org/web/20240308064911/https://developers.google.com/identity/sign-in/android/start-integrating).
41+
- Uses functional, but deprecated [legacy Android Google Sign-In](https://web.archive.org/web/20240308064911/https://developers.google.com/identity/sign-in/android/start-integrating).
3742
- Contains none of the extra features listed above.
3843

39-
## Obtaining access to the Modern version {#obtaining-access}
44+
## Obtaining Universal Sign In {#obtaining-access}
4045

41-
[Upon purchasing a license](https://rngs-package.com/), you will be able to configure your (or your colleagues') access to the private npm package and to the private repo with the sources and examples. Alternatively, as an Expo customer, obtain access through [this form](https://forms.gle/tpP7TfUGW1CwgaEZ8).
46+
Universal sign in requires [purchasing a license](https://rngs-package.com/#pricing), after which you will be able to configure your (or your colleagues') access to the private npm package and to the private repo with the sources and examples. Alternatively, as an Expo customer, obtain access through this [form](https://forms.gle/tpP7TfUGW1CwgaEZ8).
4247

4348
[//]: # 'Note that this version is distributed under a [custom license](license).'
4449

45-
Three steps are needed to access the private package, which is hosted on [GitHub npm packages registry](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-npm-registry).
50+
## Accessing the private npm package {#package-manager-setup}
4651

47-
1. [Purchase a license](https://rngs-package.com/) to immediately set up access. Alternatively, [complete the form](https://forms.gle/tpP7TfUGW1CwgaEZ8).
52+
The private npm package is like any other, but it's hosted on the [GitHub npm packages registry](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-npm-registry), not the public npm registry. Therefore, a small bit of setup is needed:
4853

49-
2. [Obtain here](https://github.com/settings/tokens/new?description=react-native-google-sign-in&scopes=read:packages) a Personal Access Token with `packages:read` permission.
54+
1. [Obtain here](https://github.com/settings/tokens/new?description=react-native-google-sign-in&scopes=read:packages) a Personal Access Token with `packages:read` permission.
5055

51-
3. Set up your package manager so that it fetches the package from the GH packages registry instead of the public registry. In this example, we're using an `NPM_TOKEN_GOOGLE_SIGN_IN` environment variable.
56+
2. Set up your package manager so that it fetches the package from the GH packages registry instead of the public registry. In this example, we're using an `NPM_TOKEN_GOOGLE_SIGN_IN` environment variable.
5257

5358
import Tabs from '@theme/Tabs';
5459
import TabItem from '@theme/TabItem';
@@ -82,12 +87,6 @@ import TabItem from '@theme/TabItem';
8287

8388
If you use another package manager ([such as Bun](https://bun.sh/docs/install/registries)), refer to its documentation on how to set up a custom registry.
8489

85-
## Requirements
86-
87-
The packages support last 3 stable releases of React Native. Unofficially, they may work with older versions too.
88-
89-
If you're using the [New Architecture](https://reactnative.dev/docs/new-architecture-intro), it's strongly recommended to use the latest React Native version available.
90-
9190
## Installing
9291

9392
<Tabs queryString="package-manager">
@@ -107,10 +106,16 @@ If you're using the [New Architecture](https://reactnative.dev/docs/new-architec
107106

108107
</Tabs>
109108

110-
If you're using the Modern version, open the lockfile (`yarn.lock` / `package-lock.json`...) and verify that the package is fetched from the GitHub registry (the entry must point to `npm.pkg.github.com`, not `registry.npmjs.org`). If it does not, it means that your package manager is not configured correctly - try uninstalling and reinstalling the package.
109+
If you're using the Universal version, open the lockfile (`yarn.lock` / `package-lock.json`...) and verify that the package is fetched from the GitHub registry (the entry must point to `npm.pkg.github.com`, not `registry.npmjs.org`). If it does not, it means that your package manager is not configured correctly - try uninstalling and reinstalling the package.
111110

112111
There are several guides to follow now:
113112

114113
- [Expo guide](setting-up/expo) for native mobile apps built with Expo
115114
- [Web guide](setting-up/web) if you want to use the package on web
116115
- If you're not using Expo but plain React Native, follow [Android guide](setting-up/android) and [iOS guide](setting-up/ios)
116+
117+
## Requirements
118+
119+
The packages support last 3 stable releases of React Native. Unofficially, they may work with older versions too.
120+
121+
If you're using the [New Architecture](https://reactnative.dev/docs/new-architecture-intro), it's strongly recommended to use the latest React Native version available.

docs/license.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ sidebar_position: 80
33
sidebar_label: License
44
---
55

6-
The original module is licensed as MIT, the Modern Sign In module has [this license](https://rngs-package.com/license).
6+
The original module is licensed as MIT, the Universal sign in module has [this license](https://rngs-package.com/license).
77

88
Please do get in touch if you have any questions or concerns about the license!

docs/migrating.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ sidebar_label: Migrating
77

88
Version 13 introduced a new JS API, which changes some method response signatures and makes minor changes to error handling (details [here](https://github.com/react-native-google-signin/google-signin/pull/1326)). If you're upgrading from version 12 or earlier, you'll need to make some minor adjustments.
99

10-
## Modern sign in module
10+
## Universal Sign In
1111

1212
1. Add the [`configure`](one-tap#configure) method to your code. This method is required to be called to configure the module.
1313

0 commit comments

Comments
 (0)