You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A command-line tool designed to help with Android signing configuration issues and quickly resolve the infamous `DEVELOPER_ERROR`, or potentially [other errors](#when-to-use) too.
10
+
11
+
## Why
12
+
13
+
To save time. Developers sometimes waste hours or even days tracking down the [errors](#when-to-use).
14
+
15
+
This tool gives you the SHA-1 fingerprints that need to be added to your Google project configuration to resolve the error.
16
+
17
+
## Usage
18
+
19
+
The tool can extract SHA-1 fingerprints directly from a device/emulator with your app installed, or from an APK file.
20
+
21
+
Run the command as shown below and follow the instructions.
-`--package-name` (optional): Your Android app's package name. If provided, the tool extracts the APK from a connected device/emulator.
34
+
-`--apk-path` (optional): Path to an APK file.
35
+
36
+
## When to use
37
+
38
+
When getting `DEVELOPER_ERROR`, unexpected [`cancelled`](https://issuetracker.google.com/issues/424210681) or even `GetCredentialProviderConfigurationException` during Sign-In. You can run into these errors:
39
+
40
+
- When setting up Google Sign-In for the first time
41
+
- After downloading your app from Play Store
42
+
- When switching between debug and release builds
43
+
44
+
### Example Output
45
+
46
+
```
47
+
✔ Application package name: com.some.app.android
48
+
49
+
🔍 Found the following SHA-1 certificate fingerprints:
Copy file name to clipboardExpand all lines: docs/install.mdx
+15-6Lines changed: 15 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,13 +20,17 @@ Why paid? According to the [State of React Native Survey](https://results.2024.s
20
20
- iOS & macOS: Powered by the [Google Sign-In SDK](https://developers.google.com/identity/sign-in/ios/start)
21
21
22
22
-**Licensed:** see [pricing](https://universal-sign-in.com/#pricing) and [license](https://universal-sign-in.com/license).
23
-
-**Trusted**: A total of over 250k npm package downloads.
23
+
-**Trusted**: A total of over 400k npm package downloads.
24
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).
25
25
-**See the UI**: [screenshots](screenshots) of the features.
26
+
-**Widely compatible & stable:** Both old and [new architecture](https://reactnative.dev/architecture/landing-page) of React Native are supported. See version [compatibility table](#requirements) below.
@@ -36,7 +40,7 @@ Why paid? According to the [State of React Native Survey](https://results.2024.s
36
40
37
41
Available on the public npm registry, this version:
38
42
39
-
- Uses the functional, but deprecated [legacy Android Google Sign-In](https://web.archive.org/web/20240308064911/https://developers.google.com/identity/sign-in/android/start-integrating) which may be removed from the Google Play Services Auth SDK (`com.google.android.gms:play-services-auth`) at some point ([source](https://developer.android.com/identity/sign-in/legacy-gsi-migration)). The free package will continue to use a version where the deprecated but functional SDK is present.
43
+
- Uses the functional, but deprecated [legacy Android Google Sign-In](https://web.archive.org/web/20240308064911/https://developers.google.com/identity/sign-in/android/start-integrating). The free package will continue to use a version where the deprecated but functional SDK is present.
40
44
- Has platform support limited to Android and iOS.
41
45
- Contains none of the extra features listed above.
42
46
@@ -113,6 +117,11 @@ There are several guides to follow now:
113
117
114
118
For latest version of Universal Sign In, `compileSdkVersion` must be {'>='} 35 and `kotlinVersion` must be {'>='} 2.0.21 in your Android project. If you use Expo SDK 53 or newer, these requirements are already met. Use [`expo-build-properties`](https://docs.expo.dev/versions/latest/sdk/build-properties/#example-appjson-with-config-plugin) to specify these values on Expo SDK {'<='} 52.
115
119
116
-
The latest versions of the packages support the last three stable releases of React Native. Use older versions of the packages if you run older React Native.
120
+
The latest version of the Universal Sign In package supports:
121
+
122
+
| | supported range |
123
+
| ------------ | --------------- |
124
+
| expo | 52.0.40 - 54 |
125
+
| react-native | 0.76.0 - 0.81 |
117
126
118
-
[React Native new architecture](https://reactnative.dev/architecture/landing-page) is supported.
127
+
Use older versions of the package if you run older React Native / Expo.
Copy file name to clipboardExpand all lines: docs/setting-up/get-config-file.mdx
+41-20Lines changed: 41 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,55 +5,76 @@ sidebar_label: Configuration
5
5
6
6
# Collecting configuration information
7
7
8
-
Before getting your hands dirty with code, some configuration needs to be taken care of. Be patient, this is the most complex part of the setup.
8
+
Before getting your hands dirty with code, some configuration needs to be taken care of. Configuration information collected in this guide is used in later steps of the setup and in the `configure()` call: [1](/docs/one-tap#configure) or [2](/docs/original#configure).
9
9
10
-
Configuration information collected in this guide is used in later steps of the setup and in the `configure()` call: [1](/docs/one-tap#configure) or [2](/docs/original#configure).
11
-
12
-
You **do not** need Firebase to configure Google Sign In. However, if you use it, it's a little easier to set up the sign in experience because Firebase gives you one file to download and put into your project.
10
+
You **do not** need to use Firebase to configure Google Sign In.
13
11
14
12
## Android
15
13
16
-
Follow the 2 steps below to set up Google Sign In for your Android app.
14
+
Follow the two steps below to set up Google Sign In for your Android app.
15
+
16
+
:::warning
17
+
In case you encounter any of the following issues, revisit this guide - it means the steps below weren't fully completed.
18
+
19
+
- if you ever get the infamous `DEVELOPER_ERROR` error
20
+
- if you can sign in with debug APK and not in release (or vice versa)
17
21
18
-
:::danger
19
-
Completing this guide is crucial for Google Sign-In to work on Android. If not done correctly, you will get the infamous `DEVELOPER_ERROR` error [(how to troubleshoot it)](/docs/troubleshooting#developer_error).
Your Android app probably uses multiple signing configurations. For example, an app might be signed differently when building `debug` and `release` APKs locally or when building on [Expo EAS](https://docs.expo.dev/app-signing/managed-credentials/#inspecting-credentials-configuration). Then there's the [Play App Signing](https://support.google.com/googleplay/android-developer/answer/9842756?hl=en) for store deployments — Google Play Store may _re-sign_ your app using one of its own signing configurations.
23
27
24
-
Your Android app probably uses multiple signing configurations. For example, an app might be signed differently when building `debug` and `release` APKs locally or when building on [Expo EAS](https://docs.expo.dev/app-signing/managed-credentials/#inspecting-credentials-configuration). Then there's the [Play App Signing](https://support.google.com/googleplay/android-developer/answer/9842756?hl=en) for store deployments — while the Google Play Store does not (re)build your app, it may _re-sign_ it using one of its own signing configurations.
28
+
:::important
29
+
If your app is not yet in the Play Store, focus only on the development APK and its SHA-1 certificate fingerprint. You can come back to this guide later when you upload your app to the Play Store.
25
30
26
-
It's extremely common for an app to have three or more signing configurations, each with its own SHA-1 certificate fingerprint.
31
+
However, be advised that in the end, you need to get the SHA-1 certificate fingerprints for _all_ signing configurations and then use _all_ of those SHA-1 fingerprints in [Step 2](#step-2) below.
32
+
:::
27
33
28
-
First, you need to **get the SHA-1 certificate fingerprints for all signing configurations** using the instructions below.
29
-
Then, use _all_ of those SHA-1 fingerprints in [Step 2](#step-2) below.
34
+
#### Collect SHA-1 certificate fingerprints from:
30
35
31
36
importTabsfrom'@theme/Tabs';
32
37
importTabItemfrom'@theme/TabItem';
33
38
34
39
<Tabs>
35
-
<TabItemvalue="playStore"label="When releasing via Google Play Store">
40
+
<TabItemvalue="config-doctor"label="A device or any APK file"default>
41
+
42
+
Use the [Configuration Doctor](../config-doctor.md). (Requires an [Universal sign in](/docs/install#sponsor-only-version) license.)
43
+
44
+
1. Get a device / emulator with the app installed, or get the APK (build it locally or in cloud, download from the Play Console / Play Store...)
45
+
2. Run the tool and follow its instructions:
46
+
47
+
```bash
48
+
npx @react-native-google-signin/config-doctor
49
+
```
50
+
51
+
</TabItem>
52
+
53
+
<TabItemvalue="playStore"label="Google Play Store (when downloading from it)">
36
54
Check if "Google Play App Signing" is enabled for your app [in the console](https://play.google.com/console/).
37
55
If it is enabled, you need to take the following steps:
38
56
39
57
1. In Google Play Console, navigate to: \<Your App\> -> Release section (in the left sidebar) -> Setup -> App Signing.
40
-
2. Under the "App signing key certificate"_and also_ "Upload key certificate", take note of `SHA-1 certificate fingerprint`. That's a total of two or more fingerprints (Play Store sometimes has more than one "App signing key certificate"!).
58
+
2. Under the "App signing key certificate", take note of `SHA-1 certificate fingerprint`(s). Play Store sometimes has more than one "App signing key certificate"!
41
59
42
60
</TabItem>
43
61
44
-
<TabItemvalue="eas"label="When using Expo EAS">
62
+
<TabItemvalue="eas"label="EAS Build">
45
63
If you use [Expo EAS](https://expo.dev/eas), run `eas credentials` to obtain
46
64
the Keystore information, which includes the SHA-1 fingerprint. See [EAS
Copy file name to clipboardExpand all lines: docs/troubleshooting.md
+15-10Lines changed: 15 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,26 +9,31 @@ sidebar_position: 70
9
9
10
10
### Login does not work when downloading from the Play Store.
11
11
12
-
See [the next paragraph](#developer_error).
12
+
See [`DEVELOPER_ERROR` paragraph](#developer_error).
13
13
14
14
### `DEVELOPER_ERROR` or `code: 10` or `Developer console is not set up correctly` error message {#developer_error}
15
15
16
-
This is always (!_always_!) a configuration mismatch between your app and the server-side setup (in Firebase or Google Cloud console).
16
+
This is always (!_absolutely always_!) a configuration mismatch between your app and the server-side setup (in Firebase or Google Cloud console).
17
17
18
-
Follow these pointers:
18
+
Firstly, if you are using Firebase Auth, verify Google is enabled as a Sign-in method in Firebase Console (Build -> Authentication -> Sign-in method).
19
19
20
-
- Follow the [setup guide](/docs/setting-up/get-config-file) and perform its steps once again.
21
-
- Make sure that your SHA-1 (_NOT_ SHA-256!) certificate fingerprints and Android package name you entered in [Firebase Console](https://console.firebase.google.com/) / [Google Cloud Console](https://console.cloud.google.com/apis/credentials?project=_) are correct.
22
-
- Add the SHA-1 from the output of [this command](https://x.com/vonovak/status/1692127631473529226) to your Firebase / Google Cloud Console. You should be able to recognize the SHA-1 — do not add a hash if you're not sure of its origin.
23
-
-[Search the issue tracker](https://github.com/react-native-google-signin/google-signin/issues?q=is%3Aissue+DEVELOPER+ERROR+is%3Aclosed) for old reports of the error.
20
+
Then: if you have the APK that gives this error, we recommend to run the [Configuration Doctor](./config-doctor.md) and follow its instructions:
21
+
22
+
```bash
23
+
npx @react-native-google-signin/config-doctor
24
+
```
25
+
26
+
Otherwise, we recommend:
27
+
28
+
- Follow the [setup guide](/docs/setting-up/get-config-file) and perform its steps once again, very carefully.
24
29
- If you're passing `webClientId` in the configuration object to `GoogleSignin.configure()`, make sure it's correct and that it is of type web (NOT Android!). You can get your `webClientId` from [Google Developer Console](https://console.developers.google.com/apis/credentials). It is listed under "OAuth 2.0 client IDs".
25
-
-If you are using Firebase, you need to add Google as a Sign-in method in Firebase itself (Build -> Authentication -> Sign-in method). If you have already created an app, you will be prompted for fingerprints and then you will get a new `google-services.json` which you need to use in your app instead of the old one.
30
+
-[Search the issue tracker](https://github.com/react-native-google-signin/google-signin/issues?q=is%3Aissue+DEVELOPER+ERROR+is%3Aclosed)for old reports of the error.
26
31
27
32
### Login does not work when using Internal App Sharing.
28
33
29
34
If you get a `DEVELOPER_ERROR` when using Internal App Sharing, it is because Google resigns your application with its own key.
30
35
31
-
See [the previous paragraph](#developer_error).
36
+
See [`DEVELOPER_ERROR` paragraph](#developer_error).
32
37
33
38
### "A non-recoverable sign in failure occurred"
34
39
@@ -50,6 +55,6 @@ Along with "Your app is missing support for the following URL schemes" error in
50
55
51
56
Your `Url Schemes` configuration is incorrect.
52
57
53
-
If you use Expo, make sure that the [config plugin](setting-up/expo#add-config-plugin) is configured correctly.
58
+
If you use Expo, verify that the [config plugin](setting-up/expo#add-config-plugin) is configured correctly.
54
59
55
60
In vanilla React Native projects, add URL type [like this](https://react-native-google-signin.github.io/docs/setting-up/ios#xcode-configuration).
0 commit comments