Skip to content

Commit 1ecea71

Browse files
authored
Merge branch 'master' into feature/firestor-add-databaseid
2 parents b3bc892 + 4c84afc commit 1ecea71

File tree

7 files changed

+57
-28
lines changed

7 files changed

+57
-28
lines changed

.github/workflows/pull_request.yml

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -8,33 +8,11 @@ on:
88
branches: [ master ]
99

1010
concurrency:
11-
group: ci-${{ github.ref }}
11+
group: ci-pull-request-${{ github.head_ref }}
1212
cancel-in-progress: true
1313

1414
jobs:
15-
lintAndApiChecks:
16-
runs-on: macos-latest
17-
permissions:
18-
contents: write
19-
steps:
20-
- uses: actions/checkout@v4
21-
with:
22-
ref: ${{ github.head_ref }}
23-
- name: Set up JDK
24-
uses: actions/setup-java@v4
25-
with:
26-
distribution: 'zulu'
27-
java-version: '17'
28-
- uses: maxim-lobanov/setup-xcode@v1
29-
with:
30-
xcode-version: latest-stable
31-
- name: Format Kotlin
32-
run: ./gradlew formatKotlin
33-
- name: Api File Update
34-
run: ./gradlew apiDump
35-
- uses: stefanzweifel/git-auto-commit-action@v6
3615
jobMatrixSetup:
37-
needs: lintAndApiChecks
3816
runs-on: macos-latest
3917
outputs:
4018
emulator_jobs_matrix: ${{ steps.dataStep.outputs.emulator_jobs_matrix }}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Lint and API Checks
2+
3+
on:
4+
pull_request_target:
5+
branches: [ master ]
6+
7+
concurrency:
8+
group: ci-lint-api-check-${{ github.head_ref }}
9+
cancel-in-progress: true
10+
11+
jobs:
12+
lintAndApiChecks:
13+
runs-on: macos-latest
14+
permissions:
15+
contents: write
16+
steps:
17+
- uses: actions/checkout@v4
18+
- name: Set up JDK
19+
uses: actions/setup-java@v4
20+
with:
21+
distribution: 'zulu'
22+
java-version: '17'
23+
cache: gradle
24+
- name: Cocoapods cache
25+
uses: actions/cache@v4
26+
with:
27+
path: |
28+
~/.cocoapods
29+
~/Library/Caches/CocoaPods
30+
*/build/cocoapods
31+
*/build/classes
32+
key: cocoapods-cache-v2
33+
- uses: maxim-lobanov/setup-xcode@v1
34+
with:
35+
xcode-version: latest-stable
36+
- name: Format Kotlin
37+
run: ./gradlew formatKotlin
38+
- name: Api File Update
39+
run: ./gradlew apiDump
40+
- uses: stefanzweifel/git-auto-commit-action@v6

firebase-auth/src/androidMain/kotlin/dev/gitlive/firebase/auth/auth.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ internal fun ActionCodeSettings.toAndroid() = com.google.firebase.auth.ActionCod
159159
.setUrl(url)
160160
.also { androidPackageName?.run { it.setAndroidPackageName(packageName, installIfNotAvailable, minimumVersion) } }
161161
.also { dynamicLinkDomain?.run { it.setDynamicLinkDomain(this) } }
162+
.also { linkDomain?.run { it.setLinkDomain(this) } }
162163
.setHandleCodeInApp(canHandleCodeInApp)
163164
.also { iOSBundleId?.run { it.setIOSBundleId(this) } }
164165
.build()

firebase-auth/src/commonMain/kotlin/dev/gitlive/firebase/auth/auth.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ public data class ActionCodeSettings(
7777
val dynamicLinkDomain: String? = null,
7878
val canHandleCodeInApp: Boolean = false,
7979
val iOSBundleId: String? = null,
80+
val linkDomain: String? = null,
8081
)
8182

8283
public data class AndroidPackageName(

firebase-auth/src/iosMain/kotlin/dev/gitlive/firebase/auth/auth.kt

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import dev.gitlive.firebase.Firebase
99
import dev.gitlive.firebase.FirebaseApp
1010
import dev.gitlive.firebase.FirebaseException
1111
import dev.gitlive.firebase.FirebaseNetworkException
12+
import dev.gitlive.firebase.FirebaseTooManyRequestsException
1213
import dev.gitlive.firebase.auth.ActionCodeResult.*
1314
import dev.gitlive.firebase.ios
1415
import kotlinx.cinterop.*
@@ -154,6 +155,7 @@ internal fun ActionCodeSettings.toIos() = FIRActionCodeSettings().also {
154155
it.setURL(NSURL.URLWithString(url))
155156
androidPackageName?.run { it.setAndroidPackageName(packageName, installIfNotAvailable, minimumVersion) }
156157
it.setDynamicLinkDomain(dynamicLinkDomain)
158+
it.setLinkDomain(linkDomain)
157159
it.setHandleCodeInApp(canHandleCodeInApp)
158160
iOSBundleId?.run { it.setIOSBundleID(this) }
159161
}
@@ -164,7 +166,7 @@ public actual open class FirebaseAuthEmailException(message: String) : FirebaseA
164166
public actual open class FirebaseAuthInvalidCredentialsException(message: String) : FirebaseAuthException(message)
165167
public actual open class FirebaseAuthWeakPasswordException(message: String) : FirebaseAuthInvalidCredentialsException(message)
166168
public actual open class FirebaseAuthInvalidUserException(message: String) : FirebaseAuthException(message)
167-
public actual open class FirebaseAuthMultiFactorException(message: String) : FirebaseAuthException(message)
169+
public actual open class FirebaseAuthMultiFactorException(message: String, public val resolver: FIRMultiFactorResolver?) : FirebaseAuthException(message)
168170
public actual open class FirebaseAuthRecentLoginRequiredException(message: String) : FirebaseAuthException(message)
169171
public actual open class FirebaseAuthUserCollisionException(message: String) : FirebaseAuthException(message)
170172
public actual open class FirebaseAuthWebException(message: String) : FirebaseAuthException(message)
@@ -241,7 +243,13 @@ private fun NSError.toException() = when (domain) {
241243
17078L, // AuthErrorCode.secondFactorRequired
242244
17088L, // AuthErrorCode.maximumSecondFactorCountExceeded
243245
17084L, // AuthErrorCode.multiFactorInfoNotFound
244-
-> FirebaseAuthMultiFactorException(toString())
246+
-> {
247+
val resolver = userInfo["FIRAuthErrorUserInfoMultiFactorResolverKey"] as? FIRMultiFactorResolver
248+
FirebaseAuthMultiFactorException(toString(), resolver)
249+
}
250+
251+
17052L, // AuthErrorCode.quotaExceeded
252+
-> FirebaseTooManyRequestsException(toString())
245253

246254
17007L, // AuthErrorCode.emailAlreadyInUse
247255
17012L, // AuthErrorCode.accountExistsWithDifferentCredential

firebase-auth/src/jsMain/kotlin/dev/gitlive/firebase/auth/auth.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ public actual class AuthTokenResult(internal val js: IdTokenResult) {
177177
internal fun ActionCodeSettings.toJson() = json(
178178
"url" to url,
179179
"android" to (androidPackageName?.run { json("installApp" to installIfNotAvailable, "minimumVersion" to minimumVersion, "packageName" to packageName) } ?: undefined),
180+
"linkDomain" to (linkDomain ?: undefined),
180181
"dynamicLinkDomain" to (dynamicLinkDomain ?: undefined),
181182
"handleCodeInApp" to canHandleCodeInApp,
182183
"ios" to (iOSBundleId?.run { json("bundleId" to iOSBundleId) } ?: undefined),

gradle/libs.versions.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ androidx-test-core = "1.7.0"
44
androidx-test-junit = "1.3.0"
55
androidx-test-runner = "1.7.0"
66
ben-manes-versions = "0.52.0"
7-
firebase-bom = "33.10.0"
8-
gitlive-firebase-java-sdk = "0.4.6"
7+
firebase-bom = "33.15.0"
8+
gitlive-firebase-java-sdk = "0.6.1"
99
gson = "2.13.1"
1010
junit = "4.13.2"
1111
kotlin = "2.2.0"
@@ -16,7 +16,7 @@ kotlinx-datetime = "0.7.1"
1616
kotlinter = "5.2.0"
1717
settings-api = "2.2"
1818
settings-language = "2.2"
19-
firebase-cocoapods = "11.4.0"
19+
firebase-cocoapods = "11.8.0"
2020
ios-deploymentTarget = "13.0"
2121
test-logger-plugin = "4.0.0"
2222
dokka = "2.0.0"

0 commit comments

Comments
 (0)