Skip to content

Commit 8759d3e

Browse files
committed
googleidentity v7.0.0
1 parent c02049c commit 8759d3e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+167
-82
lines changed

docs/googleidentity/_includes/add-manual-appdescriptor.mdx

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -28,33 +28,14 @@ Making requests and accessing the Google Identity functionality requires the som
2828
```xml
2929
<manifest android:installLocation="auto">
3030

31-
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="33"/>
31+
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="34"/>
3232

3333
<uses-permission android:name="android.permission.INTERNET"/>
34-
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
3534

3635
<application>
37-
38-
<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
39-
40-
<activity
41-
android:name="com.google.android.gms.common.api.GoogleApiActivity"
42-
android:exported="false"
43-
android:theme="@android:style/Theme.Translucent.NoTitleBar" />
44-
45-
46-
<activity
47-
android:name="com.google.android.gms.auth.api.signin.internal.SignInHubActivity"
48-
android:excludeFromRecents="true"
49-
android:exported="false"
50-
android:theme="@android:style/Theme.Translucent.NoTitleBar" />
51-
<service
52-
android:name="com.google.android.gms.auth.api.signin.RevocationBoundService"
53-
android:exported="true"
54-
android:permission="com.google.android.gms.auth.api.signin.permission.REVOCATION_NOTIFICATION"
55-
android:visibleToInstantApps="true" />
56-
5736

37+
<activity android:name="com.distriqt.core.auth.AuthorisationActivity" android:exported="false" android:theme="@android:style/Theme.Translucent.NoTitleBar"/>
38+
5839
</application>
5940

6041
</manifest>
@@ -105,6 +86,7 @@ The `URL_NAME` should be your application identifier, eg: `com.distriqt.test`
10586
See the example application for our test application implementation.
10687

10788

89+
10890
##### Optional: Configure backend authentication
10991

11092
If you need to get users' ID tokens for backend authentication, also set the `GIDServerClientID` key in your app's Info.plist file.

docs/googleidentity/changelog.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
### 2024.12.05 [v7.0.0]
2+
3+
```
4+
See the migration guide: https://docs.airnativeextensions.com/docs/googleidentity/migrating-to-v7.0
5+
6+
feat(android): update from google sign in to new androidx credentials manager (resolves https://github.com/distriqt/ANE-GoogleIdentity/issues/75, resolves https://github.com/distriqt/ANE-GoogleIdentity/issues/76)
7+
feat(android): move to gradle dependencies
8+
feat(ios): update google sign in lib to v8.0.0
9+
```
10+
111
### 2024.05.16 [v6.0.0]
212

313
```

docs/googleidentity/google-identity-options.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,16 @@ YOU DO NOT NEED TO USE THE *ANDROID CLIENT*. Android applications are identified
3131

3232
The simplest method to correctly create your options for setup is to use the `GoogleIdentityOptionsBuilder`. This class contains helper functions to construct the options correctly for the `setup` of your application. The builder is setup in such a way that you can use a single code base and the builder will determine the correct values to use in the `GoogleIdentityOptions` instance based on the current platform of the device. This allows you to simplify your code having one code base for both Android and iOS. If you wish more control you can use the direct accessors, `setClientID` and `setServerClientID`, which will ignore the current platform.
3333

34-
As a minimum you will need to set the iOS Client ID:
34+
At a minimum you will need to specify the iOS and Android client IDs:
3535

3636
```actionscript
3737
var options:GoogleIdentityOptions = new GoogleIdentityOptionsBuilder()
38-
.requestEmail()
38+
.requestEmail()
3939
.setIOSClientID( IOS_CLIENT_ID )
40+
.setAndroidServerClientID( WEB_CLIENT_ID )
4041
.build();
42+
43+
GoogleIdentity.service.setup( options );
4144
```
4245

4346

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
---
2+
title: Migrating to v7.0
3+
---
4+
5+
import Tabs from '@theme/Tabs'
6+
import TabItem from '@theme/TabItem'
7+
8+
9+
This latest release brings a number of updates to the extension particularly around the Android integration.
10+
11+
It also brings a complete rewrite of the Android implementation to use the latest Google credential and authorisiation libriaries.
12+
13+
The iOS implementation has been updated to v8.0.0 however the implementation remains largely unchanged.
14+
15+
16+
17+
18+
## Android Integration
19+
20+
### Gradle Dependencies
21+
22+
We have moved to using gradle dependencies within our extensions which will improve dependency resolution, reduce update times and improve compatibility with other extensions.
23+
24+
This also reduces the amount of work required to manually integrate the extensions, reducing the additions to the manifest in your application descriptor.
25+
26+
We highly recommend using the [apm](https://airnativeextensions.com/docs/using-apm) tool to manage the integration of the extensions in your application and to generate your application descriptor:
27+
28+
```bash
29+
apm update
30+
apm generate app-descriptor
31+
```
32+
33+
However, you can still integrate the manifest additions manually if you prefer. With this update we recommend starting fresh as there have been a lot of entries to be removed.
34+
35+
36+
37+
### Updating code
38+
39+
The main changes required to update your code are around the setup of the extension.
40+
You are now required to supply the web client ID to sign in with Google on Android so you must ensure you call `setAndroidServerClientID()` with your web client id:
41+
42+
```actionscript
43+
var options:GoogleIdentityOptions = new GoogleIdentityOptionsBuilder()
44+
.requestEmail()
45+
.setIOSClientID( IOS_CLIENT_ID )
46+
47+
// Add the web client id for android
48+
.setAndroidServerClientID( WEB_CLIENT_ID )
49+
50+
.build();
51+
52+
GoogleIdentity.service.setup( options );
53+
```
54+
55+
56+
### Updating the manifest
57+
58+
You can simplify the manifest now as well as the gradle implementation will add a significant amount of the required manifest entries for you.
59+
If you use the `apm` tool to generate your application descriptor you will see the manifest entries are significantly reduced and simply running the commands above will update the manifest for you.
60+
61+
If you manually update the manifest then, as mentioned above, we recommend starting fresh as there have been a lot of entries to be removed.
62+
The minimum manifest additions now looks like the following:
63+
64+
```xml
65+
<manifest android:installLocation="auto">
66+
67+
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="34"/>
68+
69+
<uses-permission android:name="android.permission.INTERNET"/>
70+
71+
<application>
72+
73+
<activity android:name="com.distriqt.core.auth.AuthorisationActivity" android:exported="false" android:theme="@android:style/Theme.Translucent.NoTitleBar"/>
74+
75+
</application>
76+
77+
</manifest>
78+
```
79+

docs/googleidentity/setup.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,13 @@ sidebar_label: Setup
99
Next you need to setup the platform using your Google API client ID and specify any additional
1010
options such as scopes you require:
1111

12-
At a minimum you will need to specify the iOS client ID:
12+
At a minimum you will need to specify the iOS and Android client IDs:
1313

1414
```actionscript
1515
var options:GoogleIdentityOptions = new GoogleIdentityOptionsBuilder()
1616
.requestEmail()
1717
.setIOSClientID( IOS_CLIENT_ID )
18+
.setAndroidServerClientID( WEB_CLIENT_ID )
1819
.build();
1920
2021
GoogleIdentity.service.setup( options );
@@ -30,6 +31,11 @@ After setup you may wish to attempt to [sign in silently](signing-in.md#sign-in-
3031

3132
## Games Signin
3233

34+
:::danger
35+
This process is no longer supported. Please reach out to us if you require this integration.
36+
:::
37+
38+
3339
If you are planning to use Google Play Games on Android in your application then you can use this ANE to handle the signin process for games rather than handling two authentication processes. Additionally this ANE gives you more control over the sign in options and adding extra scopes that you don't get with the Game Services ANE.
3440

3541
To do this we have added some default functionality to make the setup process simpler. Simply pass the `GoogleIdentityOptions.DEFAULT_GAMES_SIGN_IN` to the builder constructor and then set any additional options as required.

sidebars.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1766,6 +1766,7 @@ module.exports = {
17661766
{
17671767
Help: [
17681768
"googleidentity/troubleshooting",
1769+
"googleidentity/migrating-to-v7.0",
17691770
"googleidentity/migrating-to-androidx",
17701771
"googleidentity/migrating-from-version-1",
17711772
],

static/asdocs/googleidentity/all-classes.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ <h3><a href="class-summary.html" target="classFrame" style="color:black">All Cla
3434
</table>
3535
</body>
3636
</html>
37-
<!--Copyright distriqt 2016<br/>Thu May 16 2024, 09:07 PM +10:00 -->
37+
<!--Copyright distriqt 2016<br/>Thu Dec 5 2024, 09:53 PM +10:00 -->

static/asdocs/googleidentity/all-index-A.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414
The OAuth2 access token to access Google services
1515
</td></tr><tr><td class="idxrow" colspan="2"><a href="com/distriqt/extension/googleidentity/GoogleIdentityOptionsBuilder.html#addScope()" onclick="javascript:loadClassListFrame('com/distriqt/extension/googleidentity/class-list.html');">addScope</a>(scope:String) &mdash; method, class com.distriqt.extension.googleidentity.<a href="com/distriqt/extension/googleidentity/GoogleIdentityOptionsBuilder.html" onclick="javascript:loadClassListFrame('com/distriqt/extension/googleidentity/class-list.html');">GoogleIdentityOptionsBuilder</a></td></tr><tr><td width="20"></td><td></td></tr><tr><td class="idxrow" colspan="2"><a href="com/distriqt/extension/googleidentity/GoogleUser.html#authentication" onclick="javascript:loadClassListFrame('com/distriqt/extension/googleidentity/class-list.html');">authentication</a> &mdash; Property, class com.distriqt.extension.googleidentity.<a href="com/distriqt/extension/googleidentity/GoogleUser.html" onclick="javascript:loadClassListFrame('com/distriqt/extension/googleidentity/class-list.html');">GoogleUser</a></td></tr><tr><td width="20"></td><td>
1616
The authentication object for the user
17-
</td></tr><tr><td colspan="2" style="padding-bottom:20px"></td></tr><tr><td colspan="2"><font color="black" size="10px" style="bold">A</font>&nbsp;&nbsp;<a href="all-index-B.html" onclick="javascript:loadClassListFrame('index-list.html');">B</a>&nbsp;&nbsp;<a href="all-index-C.html" onclick="javascript:loadClassListFrame('index-list.html');">C</a>&nbsp;&nbsp;<a href="all-index-D.html" onclick="javascript:loadClassListFrame('index-list.html');">D</a>&nbsp;&nbsp;<a href="all-index-E.html" onclick="javascript:loadClassListFrame('index-list.html');">E</a>&nbsp;&nbsp;<a href="all-index-F.html" onclick="javascript:loadClassListFrame('index-list.html');">F</a>&nbsp;&nbsp;<a href="all-index-G.html" onclick="javascript:loadClassListFrame('index-list.html');">G</a>&nbsp;&nbsp;<a href="all-index-H.html" onclick="javascript:loadClassListFrame('index-list.html');">H</a>&nbsp;&nbsp;<a href="all-index-I.html" onclick="javascript:loadClassListFrame('index-list.html');">I</a>&nbsp;&nbsp;<a href="all-index-J.html" onclick="javascript:loadClassListFrame('index-list.html');">J</a>&nbsp;&nbsp;<a href="all-index-K.html" onclick="javascript:loadClassListFrame('index-list.html');">K</a>&nbsp;&nbsp;<a href="all-index-L.html" onclick="javascript:loadClassListFrame('index-list.html');">L</a>&nbsp;&nbsp;<a href="all-index-M.html" onclick="javascript:loadClassListFrame('index-list.html');">M</a>&nbsp;&nbsp;<a href="all-index-N.html" onclick="javascript:loadClassListFrame('index-list.html');">N</a>&nbsp;&nbsp;<a href="all-index-O.html" onclick="javascript:loadClassListFrame('index-list.html');">O</a>&nbsp;&nbsp;<a href="all-index-P.html" onclick="javascript:loadClassListFrame('index-list.html');">P</a>&nbsp;&nbsp;<a href="all-index-Q.html" onclick="javascript:loadClassListFrame('index-list.html');">Q</a>&nbsp;&nbsp;<a href="all-index-R.html" onclick="javascript:loadClassListFrame('index-list.html');">R</a>&nbsp;&nbsp;<a href="all-index-S.html" onclick="javascript:loadClassListFrame('index-list.html');">S</a>&nbsp;&nbsp;<a href="all-index-T.html" onclick="javascript:loadClassListFrame('index-list.html');">T</a>&nbsp;&nbsp;<a href="all-index-U.html" onclick="javascript:loadClassListFrame('index-list.html');">U</a>&nbsp;&nbsp;<a href="all-index-V.html" onclick="javascript:loadClassListFrame('index-list.html');">V</a>&nbsp;&nbsp;<a href="all-index-W.html" onclick="javascript:loadClassListFrame('index-list.html');">W</a>&nbsp;&nbsp;<a href="all-index-X.html" onclick="javascript:loadClassListFrame('index-list.html');">X</a>&nbsp;&nbsp;<a href="all-index-Y.html" onclick="javascript:loadClassListFrame('index-list.html');">Y</a>&nbsp;&nbsp;<a href="all-index-Z.html" onclick="javascript:loadClassListFrame('index-list.html');">Z</a>&nbsp;&nbsp;</td></tr></table><p></p><center class="copyright"><footer>Copyright <a href="https://distriqt.com" target="_top">distriqt</a> 2016</footer><br/>Thu May 16 2024, 09:07 PM +10:00 </center></div></body></html><!--Copyright distriqt 2016<br/>Thu May 16 2024, 09:07 PM +10:00 -->
17+
</td></tr><tr><td colspan="2" style="padding-bottom:20px"></td></tr><tr><td colspan="2"><font color="black" size="10px" style="bold">A</font>&nbsp;&nbsp;<a href="all-index-B.html" onclick="javascript:loadClassListFrame('index-list.html');">B</a>&nbsp;&nbsp;<a href="all-index-C.html" onclick="javascript:loadClassListFrame('index-list.html');">C</a>&nbsp;&nbsp;<a href="all-index-D.html" onclick="javascript:loadClassListFrame('index-list.html');">D</a>&nbsp;&nbsp;<a href="all-index-E.html" onclick="javascript:loadClassListFrame('index-list.html');">E</a>&nbsp;&nbsp;<a href="all-index-F.html" onclick="javascript:loadClassListFrame('index-list.html');">F</a>&nbsp;&nbsp;<a href="all-index-G.html" onclick="javascript:loadClassListFrame('index-list.html');">G</a>&nbsp;&nbsp;<a href="all-index-H.html" onclick="javascript:loadClassListFrame('index-list.html');">H</a>&nbsp;&nbsp;<a href="all-index-I.html" onclick="javascript:loadClassListFrame('index-list.html');">I</a>&nbsp;&nbsp;<a href="all-index-J.html" onclick="javascript:loadClassListFrame('index-list.html');">J</a>&nbsp;&nbsp;<a href="all-index-K.html" onclick="javascript:loadClassListFrame('index-list.html');">K</a>&nbsp;&nbsp;<a href="all-index-L.html" onclick="javascript:loadClassListFrame('index-list.html');">L</a>&nbsp;&nbsp;<a href="all-index-M.html" onclick="javascript:loadClassListFrame('index-list.html');">M</a>&nbsp;&nbsp;<a href="all-index-N.html" onclick="javascript:loadClassListFrame('index-list.html');">N</a>&nbsp;&nbsp;<a href="all-index-O.html" onclick="javascript:loadClassListFrame('index-list.html');">O</a>&nbsp;&nbsp;<a href="all-index-P.html" onclick="javascript:loadClassListFrame('index-list.html');">P</a>&nbsp;&nbsp;<a href="all-index-Q.html" onclick="javascript:loadClassListFrame('index-list.html');">Q</a>&nbsp;&nbsp;<a href="all-index-R.html" onclick="javascript:loadClassListFrame('index-list.html');">R</a>&nbsp;&nbsp;<a href="all-index-S.html" onclick="javascript:loadClassListFrame('index-list.html');">S</a>&nbsp;&nbsp;<a href="all-index-T.html" onclick="javascript:loadClassListFrame('index-list.html');">T</a>&nbsp;&nbsp;<a href="all-index-U.html" onclick="javascript:loadClassListFrame('index-list.html');">U</a>&nbsp;&nbsp;<a href="all-index-V.html" onclick="javascript:loadClassListFrame('index-list.html');">V</a>&nbsp;&nbsp;<a href="all-index-W.html" onclick="javascript:loadClassListFrame('index-list.html');">W</a>&nbsp;&nbsp;<a href="all-index-X.html" onclick="javascript:loadClassListFrame('index-list.html');">X</a>&nbsp;&nbsp;<a href="all-index-Y.html" onclick="javascript:loadClassListFrame('index-list.html');">Y</a>&nbsp;&nbsp;<a href="all-index-Z.html" onclick="javascript:loadClassListFrame('index-list.html');">Z</a>&nbsp;&nbsp;</td></tr></table><p></p><center class="copyright"><footer>Copyright <a href="https://distriqt.com" target="_top">distriqt</a> 2016</footer><br/>Thu Dec 5 2024, 09:53 PM +10:00 </center></div></body></html><!--Copyright distriqt 2016<br/>Thu Dec 5 2024, 09:53 PM +10:00 -->

0 commit comments

Comments
 (0)