Technology moves fast! ⚡ Don't get left behind.🚶 Subscribe to our mailing list to keep up with latest and greatest in open source projects! 🏆


Subscribe to our mailing list

AuthManager

Google Sign-In and SmartLock Manager

Subscribe to updates I use AuthManager


Statistics on AuthManager

Number of watchers on Github 116
Number of open issues 0
Main language Kotlin
Average time to merge a PR about 18 hours
Open pull requests 0+
Closed pull requests 0+
Last commit over 2 years ago
Repo Created over 2 years ago
Repo Last Updated over 1 year ago
Size 104 KB
Organization / Authorcharbgr
Contributors1
Page Updated
Do you use AuthManager? Leave a review!
View on github
Fresh, new opensource launches 🚀🚀🚀
Trendy new open source projects in your inbox! View examples

Subscribe to our mailing list

Evaluating AuthManager for your project? Score Explanation
Commits Score (?)
Issues & PR Score (?)

Android Arsenal

Auth Manager

AuthManager is a library which eliminates the boilerplate of Google SignIn and SmartLock integration.

Usage

compile 'com.github.charbgr:authmanager:1.0'


AuthManager includes all of the managers below.

AuthManager
    .Builder(this)
    .withGoogleApiClient(googleApiClient)
    .withGoogle(this)
    .withHints(this, hintRequest)
    .withSmartLock(this, smartlockRequest)
    .build()

override fun onDestroy() {
    super.onDestroy()
    authManager.destroy()
}

override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
    super.onActivityResult(requestCode, resultCode, data)
    authManager?.handle(requestCode, resultCode, data)
}

Standalone Managers

Google Manager

Functionality included: Google Sign-In, Google Sign-Out, Google Revoke Access

GoogleAuthManager
    .Builder(this)
    .withGoogleApiClient(googleApiClient)
    .withGoogleView(this)
    .build()

override fun onDestroy() {
    super.onDestroy()
    googleAuthManager?.clear()
}

override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
    super.onActivityResult(requestCode, resultCode, data)
    when (requestCode) {
        RC_SIGN_IN -> googleAuthManager?.handle(resultCode, data)
    }
}

API Overview

fun signInWithGoogle()
fun signOutOfGoogle()
fun revokeGoogleAccess()
fun handle(resultCode: Int, data: Intent?)
fun clear()

Smartlock Manager

Functionality included: SmartLock Credentials Request, SmartLock Credentials Save, SmartLock Credentials Delete

SmartLockManager
    .Builder(this)
    .withGoogleApiClient(googleApiClient)
    .withSmartLockView(this)
    .build()


override fun onDestroy() {
    super.onDestroy()
    smartLockManager?.clear()
}

override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
    super.onActivityResult(requestCode, resultCode, data)
    when (requestCode) {
        RC_CREDENTIAL_SAVE -> smartLockManager?.handleCredentialSave(resultCode)
        RC_CREDENTIALS_REQUEST -> smartLockManager?.handleCredentialRequest(resultCode, data)
    }
} 

API Overview

fun requestCredentials()
fun saveCredential(credential: Credential)
fun deleteCredential(credential: Credential?)
fun handleCredentialSave(resultCode: Int)
fun handleCredentialRequest(resultCode: Int, data: Intent?)
fun clear()

Hints Manager

Functionality included: E-mail Addresses Hints

HintsManager
    .Builder(this)
    .withGoogleApiClient(googleApiClient)
    .withHintsView(this)
    .build()


override fun onDestroy() {
    super.onDestroy()
    hintsManager?.clear()
}

override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
    super.onActivityResult(requestCode, resultCode, data)
    when (requestCode) {
        RC_HINT_REQUEST -> hintsManager?.handle(resultCode, data)
    }
}

API Overview

fun requestEmailHints()
fun handle(resultCode: Int, data: Intent?)
fun clear()

You need to call in Activity.onDestroy() to clear view references otherwise you risk having a memory leak.

AuthManager questions on Stackoverflow (View All Questions)
  • Replace implementation of an AuthPlugin with new AuthManager
  • YII1 How to dynamic change connection in authmanager
  • Upgrading Laravel 5.1 to 5.2: Missing argument 1 for Illuminate\Auth\AuthManager::createDriver()
  • I get authManager is undefined
  • MediaWiki REMOTE_USER auto-login with AuthManager
  • yii2 rbac authmanager getRoles() return empty
  • Why do I get ErrorException from AuthManager?
  • Missing argument 1 for Illuminate\Auth\AuthManager::createDriver() lumen and JWT
  • Properly inject AuthManager?
  • Configuring authManager using DbManager in yii2-app-base
  • Yii2: Cannot perform RBAC migration (You should configure "authManager"...)
  • session.setAttribute("authManager", manager) throws a NotSerializableException
  • Simperium, getting delegate notifications of AuthManager
  • Yii AuthManager schema and types
  • Is user group table required when using Yii authManager?
  • Issue with Yii RBAC AuthManager and Bizrules
  • Where to write Yii authManager business rules?
  • Yii framework: AuthManager
  • CException error with RBAC ACL using authManager in yiic shell tool
AuthManager list of languages used
Other projects in Kotlin