https://bravenessofdonut.tistory.com/2
위의 내용을 이미 했다는 가정 하에 작성하였습니다.
1. 좌측의 빌드에서 Authentication 선택
2. Sign-in method로 들어가기
3. 이메일/비밀번호, Google (필요한거 선택하세요) 선택하고 사용설정 선택
4. build.gradle
1) 일반 로그인 기능 (자체 앱)
밑의 링크는 파이어베이스 공식문서입니다.
https://firebase.google.com/docs/auth/android/start?hl=ko&authuser=0#kotlin+ktx
dependencies {
// Import the BoM for the Firebase platform
implementation platform('com.google.firebase:firebase-bom:31.1.1')
// Add the dependency for the Firebase Authentication library
// When using the BoM, you don't specify versions in Firebase library dependencies
implementation 'com.google.firebase:firebase-auth-ktx'
}
위의 코드를 앱수준 build.gradle에 넣어주시면 되는데 파이어베이스 봄이 이미 추가되어있다면 밑의 코드만 넣어주시면 됩니다.
2) 구글 로그인
밑의 링크 역시 공식문서입니다.
https://firebase.google.com/docs/auth/android/google-signin?hl=ko
dependencies {
// Import the BoM for the Firebase platform
implementation platform('com.google.firebase:firebase-bom:31.1.1')
// Add the dependency for the Firebase Authentication library
// When using the BoM, you don't specify versions in Firebase library dependencies
implementation 'com.google.firebase:firebase-auth-ktx'
// Also add the dependency for the Google Play services library and specify its version
implementation 'com.google.android.gms:play-services-auth:20.4.0'
}
일반로그인 기능(4번의 1번) 의 코드를 추가하셨다면 맨 밑의 코드만 추가하시면 됩니다.
'개발 > 파이어베이스' 카테고리의 다른 글
[Firebase] 1. Firebase 시작 (SDK설치) (0) | 2023.01.16 |
---|