https://github.com/sabo99/firebaseauth-google
Firebase Authentication with Google Account & Kotlin Programming Android Studio
https://github.com/sabo99/firebaseauth-google
android-studio firebase-auth firebase-google-authentication kotlin
Last synced: 8 months ago
JSON representation
Firebase Authentication with Google Account & Kotlin Programming Android Studio
- Host: GitHub
- URL: https://github.com/sabo99/firebaseauth-google
- Owner: sabo99
- Created: 2021-12-15T04:29:05.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-12-17T04:47:18.000Z (over 4 years ago)
- Last Synced: 2025-01-14T15:20:31.675Z (over 1 year ago)
- Topics: android-studio, firebase-auth, firebase-google-authentication, kotlin
- Language: Kotlin
- Homepage:
- Size: 842 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
#
Firebase Authentication with Google Account
Authentication Android application using `Firebase` with the login system using **Google Account**
### **App Features Firebase Authentication with Google Account** :
- **_Firebase_**
- Authentication with **`Google Account`**
## Important!
### Add Firebase to your Android project go to `Firebase Setup`
## Design UI App Firebase Authentication with Google Account
### **`Preview Firebase Auth with Google Account`**

### **`Preview UI FirebaseAuth-Google`**
| Name Page | Preview UI |
| :---------------------: | :--------------------------------------------------------: |
| `Home` |
|
| `Choose an Account` |
|
| `Account created` |
|
| `Account already exist` |
|
| `Sign out` |
|
## Result on Firebase Console
### **`Authentication`**

## Dependencies used
```groovy
/** Firebase*/
implementation platform('com.google.firebase:firebase-bom:29.0.1')
implementation 'com.google.firebase:firebase-analytics-ktx'
implementation 'com.google.firebase:firebase-auth-ktx'
implementation 'com.google.android.gms:play-services-auth:20.0.0'
```
### Integration Step Used Binding in Kotlin
1. Add **viewBinding `true`** `build.gralde (Module)`
```groovy
android {
...
buildFeatures {
viewBinding true
}
}
```
2. Activity Kotlin Class
```kotlin
class MainActivity : AppCompatActivity() {
/** Add this */
private lateinit var binding: ActivityMainBinding
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
/** Add this */
binding = ActivityMainBinding.inflate(layoutInflater)
/** Change this */
setContentView(binding.root)
/** Without findViewById */
binding.textView.text = "Bye bye findViewById"
}
}
```
3. Activity Java Class
```java
public class MainActivity extends AppCompatActivity {
/** Add this */
private ActivityMainBinding binding;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
/** Add this */
binding = ActivityMainBinding.inflate(getLayoutInflater());
/** Change this */
setContentView(binding.getRoot());
/** Without findViewById */
binding.textView.setText("Bye bye findViewById");
}
}
```
**binding** in kotlin can be used directly without initializing **findViewById** on widgets in layout xml