-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* [base] firebase 라이브러리 추가 및 적용 * [base] google-services.json 추가 * [base] gitignore 업데이트 * [chore] 구글 로그인 의존성 마이그레이션 * [chore] 인터넷 권한 추가 * [chore] 미사용 리소스 제거 * [chore] target api 수정 * [chore] credentials proguard 추가 * [chore] login 모듈 manifest 제거 * [chore] 미사용 리소스 제거 * [chore] theme 디자인 시스템 반영 및 로그인 화면 등록 * [feature] 구글 로그인 구현 * [chore] 미사용 리소스 제거 및 즁요 정보 은닉화 * [chore] 트레일링 콤마 추가 * [chore] properties.getProperty elvis 연산 추가 * [chore] properties.getProperty("web_client_id") null인 경우 추가 * [chore] google client id ktlint ci 조건 추가
- Loading branch information
Showing
18 changed files
with
111 additions
and
223 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,4 +12,4 @@ | |
/captures | ||
.externalNativeBuild | ||
.cxx | ||
local.properties | ||
app/google-services.json |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
/build | ||
/build | ||
/local.properties | ||
google-services.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,4 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"> | ||
|
||
<application | ||
android:allowBackup="true" | ||
android:icon="@mipmap/ic_launcher" | ||
android:label="@string/app_name" | ||
android:roundIcon="@mipmap/ic_launcher_round" | ||
android:supportsRtl="true" | ||
android:theme="@style/Theme.Pokit"> | ||
<activity | ||
android:name=".MainActivity" | ||
android:exported="true" | ||
android:label="@string/app_name" | ||
android:theme="@style/Theme.Pokit"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
|
||
<category android:name="android.intent.category.LAUNCHER" /> | ||
</intent-filter> | ||
</activity> | ||
</application> | ||
|
||
</manifest> |
49 changes: 49 additions & 0 deletions
49
feature/login/src/main/java/pokitmons/pokit/login/LoginScreen.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
package pokitmons.pokit.login | ||
|
||
import android.annotation.SuppressLint | ||
import android.util.Log | ||
import androidx.compose.material3.Text | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.runtime.rememberCoroutineScope | ||
import androidx.compose.ui.platform.LocalContext | ||
import androidx.credentials.CredentialManager | ||
import androidx.credentials.GetCredentialRequest | ||
import com.google.android.libraries.identity.googleid.GetGoogleIdOption | ||
import com.google.android.libraries.identity.googleid.GoogleIdTokenCredential | ||
import kotlinx.coroutines.launch | ||
|
||
@SuppressLint("CoroutineCreationDuringComposition") | ||
@Composable | ||
fun LoginScreen() { | ||
// TODO 서버 api 개발완료 후 viewmodel 연동 및 아키텍처 구축 | ||
|
||
Text(text = "로그인 테스트 화면") | ||
val coroutineScope = rememberCoroutineScope() | ||
|
||
val context = LocalContext.current | ||
val credentialManager = CredentialManager.create(context) | ||
|
||
val googleIdOption: GetGoogleIdOption = GetGoogleIdOption.Builder() | ||
.setFilterByAuthorizedAccounts(false) | ||
.setServerClientId(BuildConfig.WEB_CLIENT_ID) | ||
.setAutoSelectEnabled(true) | ||
.build() | ||
|
||
val request: GetCredentialRequest = GetCredentialRequest.Builder() | ||
.addCredentialOption(googleIdOption) | ||
.build() | ||
|
||
coroutineScope.launch { | ||
try { | ||
val result = credentialManager.getCredential( | ||
request = request, | ||
context = context | ||
) | ||
val googleIdTokenCredential = GoogleIdTokenCredential.createFrom(result.credential.data) | ||
val googleIdToken = googleIdTokenCredential.idToken | ||
Log.d("success: ", googleIdToken) | ||
} catch (e: Exception) { | ||
Log.d("failed : ", e.message.toString()) | ||
} | ||
} | ||
} |
46 changes: 0 additions & 46 deletions
46
feature/login/src/main/java/pokitmons/pokit/login/MainActivity.kt
This file was deleted.
Oops, something went wrong.
11 changes: 0 additions & 11 deletions
11
feature/login/src/main/java/pokitmons/pokit/login/ui/theme/Color.kt
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.