Fork us on GitHub

Sign In With...

New extensible framework for service login featuring Google & Facebook
Sign In With...

Sign In With...

Chen recently published a major refactoring of our connection framework which up until now only supported Facebook login. With this recent refactoring the code to connect to various authentication services becomes far simpler and various services should become more pluggable. The default implementation centers around the Login and LoginCallback classes that use oAuth by default to perform the login.

FacebookConnect keeps working just like it always did but now it extends the Login class to provide generic login functionality which means we can seamlessly provide additional login targets either via oAuth or even via native integration with 3rd party SDK's. One of the first integrations here is the GoogleConnect support which allows logging into a Google account to sign in. This is especially great on Android devices where the process to sign in is seamless!

Working with the GoogleConnect class requires a corresponding Google cloud project. To enable this you need to follow the instructions here to allow web login. The web login option is essential for simulator login thus crucial for debugging. You would also need to follow the instructions for Android and iOS respectively.

The login framework should serve as the basis can can be extended easily via cn1lib's, we hope to provide such login frameworks for various services out there and also to migrate some of the existing oAuth usages by cn1lib's to use this framework instead of the mix and match options we have right now.

Share this Post:

Posted by Shai Almog

Shai is the co-founder of Codename One. He's been a professional programmer for over 25 years. During that time he has worked with dozens of companies including Sun Microsystems.
For more follow Shai on Twitter & github.