@titanium/googlesignin v1.0.44
👉 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
Install
@titanium/googlesignin
in root of project Add required properties to iOS plist intiapp.xml
- ✨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
Install @titanium/googlesignin
in root of project
npm install @titanium/googlesignin
Add required properties to iOS plist in tiapp.xml
<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
- 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
signIn()
signInSilently()
signOut()
disconnect()
hasAuthInKeychain
-> BooleancurrentUserImageURLWithSize(size)
-> String
Properties
language
(String,get|set
)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
login
logout
cancel
load
open
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
⭐ ti.googlesignin GitHub Repo - Repo for original ti.googlesignin module
📣 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.
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
4 years ago