⭐ Axway Amplify module for using Google Sign-in with Appcelerator Titanium SDK Framework
npm install @titanium/googlesignin[//]: # (header-start)
🪦 RIP Axway Amplify Titanium (2010 - 2022)
🪦 RIP Axway Amplify Cloud Services (2012 - 2022)
🪦 RIP Axway Amplify Crash Analytics (2015 - 2022)
> 👉 A group of Axway employees, ex-Axway employees, and some developers from Titanium community have created a legal org and now officially decide all matters related to future of these products.
* API Best Practices
* What is API Security?
* OWASP Top 10 List for API Security
* What is API Security?
* Top API Trends for 2022
* What is a Frankenstein API?
* What is a Zombie API?
* API Developer Experience
* API Cybersecurity 101
* YouTube API Videos
* YouTube API Shorts Videos

[//]: # (header-end)


* 📝 Description
* 🚀 Getting Started
* Install @titanium/googlesignin in root of project
* Add required properties to iOS plist in tiapp.xml
* ✨Features
* Requirements
* Example
* APIs
* Methods
* Properties
* Events
* License
* Authors
* 📚Learn More
* 📣 Feedback
* ©️ Legal
Native modules that allows you to use the Google Sign-in SDK with Axway Titanium native mobile apps.
> This is a repackaging of the compiled iOS module for ti.googlesignin to allow for installation via npm.
``bash`
npm install @titanium/googlesignin
`xml`
* [x] Includes Titanium native iOS module: ti.googlesignin 3.0.0
-
This module was designed to follow a similar scheme like Ti.Facebook and Ti.GoogleSignIn.
`js
const google = require('ti.googlesignin');
google.initialize({
clientID: 'xxxxxxxx-123456789.apps.googleusercontent.com',
// Optional properties:
serverClientID: '
scopes: ['https://www.googleapis.com/auth/plus.login'], // See https://developers.google.com/identity/protocols/googlescopes for more
language: 'de', // Or 'de-DE', 'en-US', etc.
loginHint: 'Titanium rocks!',
hostedDomain: 'https://my-hosted-domain.com',
shouldFetchBasicProfile: false, // Default: true
openIDRealm: 'my-openID-realm',
});
google.addEventListener('login', e => {
if (!e.success) {
Ti.API.error(Cannot login to Google: ${e.error});
return;
}
const result = e.user;
console.info('Logged in to Google!');
// Do something with user result
});
google.addEventListener('logout', e => {
console.info('Google Logged out / disconnected!');
});
// sign in
google.signIn();
// sign out
if (google.hasAuthInKeychain()) {
google.disconnect();
}
`
#### Methods
- [x] signIn()signInSilently()
- [x] signOut()
- [x] disconnect()
- [x] hasAuthInKeychain
- [x] -> BooleancurrentUserImageURLWithSize(size)
- [x] -> String
#### Properties
* [x] language (String, get|set)currentUser
* [x] (Dictionary, get)id
* (String) scopes
* (ArrayserverAuthCode
* (String) hostedDomain
* (String) profile
* (Dictionary)name
* (String)givenName
* (String)familyName
* (String)email
* (String)hasImage
* (Boolean)authentication
* (Dictionary)clientID
* (String)accessToken
* (String)accessTokenExpirationDate
* (Date)refreshToken
* (String)idToken
* (String)idTokenExpirationDate
* (Date)
#### Events
- [x] loginlogout
- [x] cancel
- [x] load
- [x] open
- [x] close
- [x]
The login- and logout events include a success flag as well as a user key that includes the following user-infos:```
id, scopes, serverAuthCode, hostedDomain, profile, authentication
Apache 2.0
Hans Knöchel
⭐ ti.googlesignin GitHub Repo - Repo for original ti.googlesignin module
Have an idea or a comment? Join in the conversation here!
Modules are licensed under Apache 2.0 from https://github.com/appcelerator-modules/titanium-googlesignin
Alloy is developed by Appcelerator and the community and is Copyright © 2012-Present by Appcelerator, Inc. All Rights Reserved.
Alloy is made available under the Apache Public License, version 2. See their license file for more information.
Appcelerator is a registered trademark of Appcelerator, Inc. Titanium is a registered trademark of Appcelerator, Inc. Please see the LEGAL information about using trademarks, privacy policy, terms of usage and other legal information at http://www.appcelerator.com/legal.