Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: toss/toss-login-android-sdk
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.0.1
Choose a base ref
...
head repository: toss/toss-login-android-sdk
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
  • 11 commits
  • 3 files changed
  • 3 contributors

Commits on Dec 6, 2023

  1. Update README.md

    bradley-lee authored Dec 6, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    ffb0163 View commit details
  2. Update README.md

    bradley-lee authored Dec 6, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    b51490f View commit details
  3. Update README.md

    bradley-lee authored Dec 6, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    f79cd4e View commit details
  4. Update README.md

    bradley-lee authored Dec 6, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    6be5ed3 View commit details
  5. Update README.md

    bradley-lee authored Dec 6, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    0ecc845 View commit details
  6. Update README.md

    bradley-lee authored Dec 6, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    5b48069 View commit details
  7. Update README.md

    bradley-lee authored Dec 6, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    de17aee View commit details
  8. Unverified

    This user has not yet uploaded their public signing key.
    Copy the full SHA
    3d64684 View commit details
  9. readme 수정

    bradley-lee committed Dec 6, 2023

    Unverified

    This user has not yet uploaded their public signing key.
    Copy the full SHA
    893d9cb View commit details
  10. readme 버전 수정

    bradley-lee committed Dec 6, 2023

    Unverified

    This user has not yet uploaded their public signing key.
    Copy the full SHA
    aaeea23 View commit details

Commits on Mar 14, 2024

  1. 리드미 수정

    bradley-lee committed Mar 14, 2024

    Unverified

    This user has not yet uploaded their public signing key.
    Copy the full SHA
    7767195 View commit details
17 changes: 10 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# 토스 android-sdk
토스 Android SDK 를 위한 모노레포입니다.
# 토스 로그인 android-sdk
토스 로그인 Android SDK 를 위한 모노레포입니다.

## 설치 하기

### 요구 사항
토스 Android SDK를 설치하기 전에 최소 요구 사항을 확인하세요.
토스 로그인 Android SDK를 설치하기 전에 최소 요구 사항을 확인하세요.
- Android 6.0 (API 23) 이상

### 라이브러리 다운로드
@@ -26,7 +26,7 @@ allprojects {
```groovy
dependencies {
implementation 'com.github.toss:toss-android-sdk:v1.0.0'
implementation 'com.github.toss:toss-android-sdk:1.0.3'
}
```

@@ -104,15 +104,18 @@ class TossLoginApplication : Application() {

### 로그인 요청

토스로 로그인을 하기 위해선 `TossSdk.login(context: Context, onResult: (TossLoginResult) -> Unit)` 함수를 호출하세요,
`isLoginAvailable(context: Context)` 함수로 토스앱 실행 가능 여부를 확인할 수 있어요.
- 토스로 로그인을 하기 위해선 `TossLoginController.login(context: Context, policy : String?, onResult: (TossLoginResult) -> Unit)` 함수를 호출하세요
- policy 의 default 는 null 입니다 -> null 이면 policy 가 설정되지 않습니다.
- `isLoginAvailable(context: Context)` 함수로 토스앱 실행 가능 여부를 확인할 수 있어요.


```kotlin

if (TossLoginController.isLoginAvailable(context).not()) {
return TossLoginController.moveToPlaystore(context)
}

TossLoginController.login(context) { resunt ->
TossLoginController.login(context, "CHANGE_PERSONAL_INFO") { resunt ->
when (result) {
is TossLoginResult.Success -> {
// authCode 를 통해 accessToken을 발급받으세요.
Original file line number Diff line number Diff line change
@@ -4,7 +4,6 @@ import android.content.Context
import android.content.Intent
import android.net.Uri
import com.vivarepublica.loginsdk.foundation.*
import com.vivarepublica.loginsdk.model.TossLoginPolicy
import com.vivarepublica.loginsdk.model.TossLoginResult
import kotlinx.coroutines.*
import kotlinx.coroutines.flow.MutableSharedFlow
@@ -25,7 +24,7 @@ object TossLoginController {
@OptIn(DelicateCoroutinesApi::class)
fun login(
context: Context,
policy: TossLoginPolicy? = null,
policy: String? = null,
onResult: (TossLoginResult) -> Unit
) {
GlobalScope.launch {
@@ -43,7 +42,7 @@ object TossLoginController {

private fun createLoginUrl(
context: Context,
policy: TossLoginPolicy? = null
policy: String? = null
): String {

fun createRedirectUrlPrefix(): String {
@@ -63,7 +62,7 @@ object TossLoginController {
.appendQueryParameter("origin", packageName(context))
.apply {
policy?.let {
appendQueryParameter("oauth_policy", it.paramString)
appendQueryParameter("oauth_policy", policy)
}
}
.build()

This file was deleted.