{"id":13749736,"url":"https://github.com/hansemannn/titanium-google-signin","last_synced_at":"2025-04-15T20:42:24.989Z","repository":{"id":17598234,"uuid":"82315899","full_name":"hansemannn/titanium-google-signin","owner":"hansemannn","description":"Use the native Google Sign In SDK in Appcelerator Titanium.","archived":false,"fork":false,"pushed_at":"2024-01-20T20:58:48.000Z","size":90690,"stargazers_count":30,"open_issues_count":3,"forks_count":17,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-03-29T01:11:18.477Z","etag":null,"topics":["android-sdk","google-signin","ios-sdk","javascript","native","titanium"],"latest_commit_sha":null,"homepage":"","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hansemannn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-02-17T16:26:54.000Z","updated_at":"2024-03-04T02:57:00.000Z","dependencies_parsed_at":"2024-11-16T00:31:51.732Z","dependency_job_id":"55f13736-fe7c-4e1c-a022-6689e513b2eb","html_url":"https://github.com/hansemannn/titanium-google-signin","commit_stats":null,"previous_names":[],"tags_count":30,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hansemannn%2Ftitanium-google-signin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hansemannn%2Ftitanium-google-signin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hansemannn%2Ftitanium-google-signin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hansemannn%2Ftitanium-google-signin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hansemannn","download_url":"https://codeload.github.com/hansemannn/titanium-google-signin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249151698,"owners_count":21221097,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android-sdk","google-signin","ios-sdk","javascript","native","titanium"],"created_at":"2024-08-03T07:01:11.243Z","updated_at":"2025-04-15T20:42:24.963Z","avatar_url":"https://github.com/hansemannn.png","language":"Objective-C","funding_links":[],"categories":["Objective-C"],"sub_categories":[],"readme":"# Google SignIn SDK in Appcelerator Titanium\n\n\u003cimg src=\"example/demo.gif\" height=\"300\" alt=\"Google SignIn\" /\u003e   \n   \n## Summary\n\nTi.GoogleSignIn is an open-source project to support the Google SignIn SDK in Appcelerator's Titanium.\n\n## Requirements\n\n  * Titanium SDK 9.2.0+\n  * Ti.PlayServices (Android)\n\n### Download\n\n[Releases page](https://github.com/hansemannn/titanium-google-signin/releases)\n\n### Setup\n\n#### iOS Setup\n\nAdd the following URL types to your plist section of the tiapp.xml:\n```xml\n\u003ckey\u003eCFBundleURLTypes\u003c/key\u003e\n\u003carray\u003e\n    \u003cdict\u003e\n        \u003ckey\u003eCFBundleTypeRole\u003c/key\u003e\n        \u003cstring\u003eEditor\u003c/string\u003e\n        \u003ckey\u003eCFBundleURLName\u003c/key\u003e\n        \u003cstring\u003egoogle\u003c/string\u003e\n        \u003ckey\u003eCFBundleURLSchemes\u003c/key\u003e\n        \u003carray\u003e\n            \u003c!-- Example: com.googleusercontent.apps.123456789-xxxxxxxx --\u003e\n            \u003cstring\u003eYOUR_REVERSE_CLIENT_ID\u003c/string\u003e\n        \u003c/array\u003e\n    \u003c/dict\u003e\n\u003c/array\u003e\n```\n\n#### Android Setup\n\nThe Android setup is made possible by the excellent work from [chmiiller](https://github.com/chmiiller) and [AppWerft](https://github.com/AppWerft) in the [Ti.GoogleSignIn](https://github.com/AppWerft/Ti.GoogleSignIn) repository. Thank you!\n\n##### Permissions in manifest\n\n```xml\n\u003cuses-permission android:name=\"android.permission.INTERNET\" /\u003e\n\u003cuses-permission android:name=\"android.permission.GET_ACCOUNTS\" /\u003e\n\u003cuses-permission android:name=\"android.permission.USE_CREDENTIALS\" /\u003e\n```\n\n##### ⚠️ PLEASE NOTE!\n\n**You will need to use the Web ClientID from Google instead of an Android one.**\n\n\u003cimg src=\"example/webkey.png\" alt=\"Google Play Console\" /\u003e\n\n##### Obtaining a SHA-1 with Titanium\n\nIn order to use Google Sign In in your app you will need to provide an SHA-1 certificate fingerprint for Google Console.\nYou will need to provide a debug and a distribution SHA-1 fingerprint for your app. On Titanium, the debug SHA-1\nhas to be generated from the `dev_keystore` file from your Titanium SDK android folder located at \"mobilesdk/\u003cplatform\u003e/\u003csdk_version\u003e/android/dev_keystore\".\nOn macOS for example it would rely on: \"~/Library/Application\\ Support/Titanium/mobilesdk/osx/9.3.0.GA/android/dev_keystore\".   \nAnd an command line example for it would be:   \n```\nkeytool -list -v -keystore ~/Library/Application\\ Support/Titanium/mobilesdk/osx/9.3.0.GA/android/dev_keystore\n```   \n\nYou can follow same instructions used to configure a map in your Android app from [Appcelerator Docs](http://docs.appcelerator.com/platform/latest/#!/guide/Google_Maps_v2_for_Android-section-src-36739898_GoogleMapsv2forAndroid-ObtainandAddaGoogleAPIKey).   \n\nThis repo also [includes a video](https://github.com/AppWerft/Ti.GoogleSignIn/blob/master/example/How%20to%20create%20Android%20keys.mov) on how to create an Android app on Firebase and Google Developers Console to better explain the process.   \nAs Appcelerator's documentation recommends, when submitting your app to Google Play Store you will need to create a production .keystore file, so don't forget to create another SHA-1 for this key and remember to add it also as another \"fingerprint\" on Firebase.   \nNote that some users have reported problems when submitting new apps to the Play Store, where the Google Login stop working on production. A solution found was to get another SHA-1 fingerprint from the Google Play app's dashboard and add this fingerprint to Firebase.\nThese fingerprints could be found on your Google Play Console, under the \"Release Management\" menu on the left and then on \"App signing\".\nHere is an example on how it looks like:   \n\u003cimg src=\"example/play_store_sha1.png\" width=\"483\" alt=\"Google Play Console\" /\u003e   \n\n#### Example\n\nInitialize the module by setting the Google SignIn API key you can get from the Google API Console.\n```javascript\nimport GoogleSignIn from 'ti.googlesignin';\n\nGoogleSignIn.initialize({\n    // Required properties\n    clientID: '\u003cclient-id\u003e',\n\n    // Optional properties:\n    serverClientID: '\u003cserver-client-id\u003e',\n    scopes: ['https://www.googleapis.com/auth/plus.login'], // See https://developers.google.com/identity/protocols/googlescopes for more\n    loginHint: 'Titanium rocks!',\n    hostedDomain: 'https://my-hosted-domain.com',\n    openIDRealm: 'my-openID-realm',\n});\n```\n#### Methods\n\n- [x] `signIn()`\n- [x] `signInSilently()`\n- [x] `signOut()`\n- [x] `disconnect()`\n- [x] `hasAuthInKeychain` -\u003e Boolean\n- [x] `currentUserImageURLWithSize(size)` -\u003e String (iOS only)\n\n#### Properties\n\n* [x] `language` (String, `get|set`, iOS, only)\n* [x] `currentUser` (Dictionary, `get`)\n    * `id` (String) \n    * `scopes` (Array\u003cString\u003e) \n    * `serverAuthCode` (String) \n    * `hostedDomain` (String) \n    * `profile` (Dictionary)\n        * `name` (String)\n        * `givenName` (String)\n        * `familyName` (String)\n        * `email` (String)\n        * `hasImage` (Boolean)\n    * `authentication` (Dictionary)\n        * `clientID` (String)\n        * `accessToken` (String)\n        * `accessTokenExpirationDate` (Date)\n        * `refreshToken` (String)\n        * `idToken` (String)\n        * `idTokenExpirationDate` (Date)\n\n#### Events\n\n- [x] `login`\n- [x] `logout`\n\nThe login event also includes the current user via the `user` property.\n\n### Build\n\nIf you want to build the module from the source, you need to check some things beforehand:\n- Set the `TITANIUM_SDK_VERSION` inside the `ios/titanium.xcconfig` file to the Ti.SDK version you want to build with.\n- Build the project with `appc run -p ios --build-only`\n- Check the [releases tab](https://github.com/hansemannn/titanium-google-signin/releases) for stable pre-packaged versions of the module\n\n### Example\n\nFor a basic example, check the demo in `example/app.js`. For a full sample-app, check out the demo in `example/sample-app`.\n\n### Author\n\nHans Knoechel ([@hansemannnn](https://twitter.com/hansemannnn) / [Web](http://hans-knoechel.de))\n\n### License\n\nApache 2.0\n\n### Contributing\n\nCode contributions are greatly appreciated, please submit a new [pull request](https://github.com/hansemannn/titanium-google-signin/pull/new/master)!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhansemannn%2Ftitanium-google-signin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhansemannn%2Ftitanium-google-signin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhansemannn%2Ftitanium-google-signin/lists"}