Preparing for end of Axway
👇 support for Amplify Cloud and Mobile 👇
🛑 Axway support for Amplify products has ended for most products related to mobile and cloud.
Axway Amplify End-of-Life (EOL) announcements. However, all closed-source projects and most open-source projects are now dead.
A few of the open-source versions of Axway Amplify products will live on after
👉 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 FAQ:
- 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
@titanium/googlesignin
📝 Description-
🚀 Getting Started ✨ Features- Requirements
- Example
- APIs * Methods * Properties * Events
- License
- Authors
📚 Learn More📣 Feedback©️ Legal
📝 Description
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.
🚀 Getting Started
@titanium/googlesignin
in root of project
Install npm install @titanium/googlesignin
tiapp.xml
Add required properties to iOS plist in <ti:app xmlns:ti="http://ti.appcelerator.org">
<ios>
<plist>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLName</key>
<string>google</string>
<key>CFBundleURLSchemes</key>
<array>
<!-- Example: com.googleusercontent.apps.123456789-xxxxxxxx -->
<string>YOUR_REVERSE_CLIENT_ID</string>
</array>
</dict>
</array>
</plist>
</ios>
</ti:app>
✨ Features
- [x] Includes Titanium native iOS module:
ti.googlesignin 3.0.0
Requirements
Example
This module was designed to follow a similar scheme like Ti.Facebook and Ti.GoogleSignIn.
const google = require('ti.googlesignin');
google.initialize({
clientID: 'xxxxxxxx-123456789.apps.googleusercontent.com',
// Optional properties:
serverClientID: '<server-client-id>',
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();
}
APIs
Methods
- [x]
signIn()
- [x]
signInSilently()
- [x]
signOut()
- [x]
disconnect()
- [x]
hasAuthInKeychain
-> Boolean - [x]
currentUserImageURLWithSize(size)
-> String
Properties
- [x]
language
(String,get|set
) - [x]
currentUser
(Dictionary,get
)-
id
(String) -
scopes
(Array) -
serverAuthCode
(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]
login
- [x]
logout
- [x]
cancel
- [x]
load
- [x]
open
- [x]
close
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
License
Apache 2.0
Authors
Hans Knöchel
📚 Learn More
📣 Feedback
Have an idea or a comment? Join in the conversation here!
©️ Legal
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.