This is repo contains multiple helper modules which help you quickly adapt your Authentication
process to your application.
See sample code & each library module for more detail.
This Credentials auth library
provides a simple way to help you easy to handle credentials authentication and token management.
Some of features are signIn
, signOut
, refreshToken
...
This Biometric authentication library
is a small wrapper androidx biometric
library which provides a simple way to help you easy to handle biometric authentication.
Combine with Credentials auth library
to support your user to use biometric to sign in.
There are 2 small libraries built on top of Firebase authentication
and Google Sign-In SDK
for android.
- With Firebase authentication you can manage the authentication result from Firebase.
- With Google Standard authentication you get the GoogleSignInAccount result directly from Google, and provide signIn info to your BackEnd.
Same with Google, the 2 libraries built on top of Firebase authentication
and Facebook SDK
for android.
- With Firebase authentication you can manage the authentication result from Firebase.
- With Facebook Standard authentication you get the result directly from Facebook, and provide signIn info to your BackEnd.
From project build.gradle
(or settings.gradle
), add Jitpack maven
repositories {
maven { url 'https://jitpack.io' }
}
Then add required dependencies to your app/build.gradle
dependencies {
implementation "com.github.sun-asterisk.tech-standard-android-auth:core:${latest_version}" // required
implementation "com.github.sun-asterisk.tech-standard-android-auth:biometricauth:${latest_version}"
implementation "com.github.sun-asterisk.tech-standard-android-auth:credentialsauth:${latest_version}"
implementation "com.github.sun-asterisk.tech-standard-android-auth:googleauth:${latest_version}"
implementation "com.github.sun-asterisk.tech-standard-android-auth:googlefirebaseauth:${latest_version}"
implementation "com.github.sun-asterisk.tech-standard-android-auth:facebookauth:${latest_version}"
implementation "com.github.sun-asterisk.tech-standard-android-auth:facebookfirebaseauth:${latest_version}"
}
That's it, to see more detail, see Wiki
Feel free to make a pull request. Make sure your code is formatted and fixed lint issues.
- Clean project first to copy team-props git-hooks
- Pull and checkout from
develop
branch - A commit message must be have one of these prefixes [add|modify|fix|revert|hotfix], Ex: [Modify] README.md
- To auto format code, run
./gradlew ktlintFormat
- To check lint issues, run
./gradlew detekt
See all reports inreports
folder.
Copyright 2023 Sun-Asterisk.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.