Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ abstract class AuthProvider(open val providerId: String, open val providerName:
return actionCodeSettings {
url = continueUrl
handleCodeInApp = emailLinkActionCodeSettings.canHandleCodeInApp()
linkDomain = emailLinkActionCodeSettings.linkDomain
Comment thread
demolaf marked this conversation as resolved.
iosBundleId = emailLinkActionCodeSettings.iosBundle
setAndroidPackageName(
emailLinkActionCodeSettings.androidPackageName ?: "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,29 @@ class AuthProviderTest {
// Email Provider Tests
// =============================================================================================

@Test
fun `addSessionInfoToActionCodeSettings preserves linkDomain`() {
val actionCodeSettings = actionCodeSettings {
url = "https://example.com"
handleCodeInApp = true
linkDomain = "myapp.page.link"
setAndroidPackageName("com.example", true, null)
}

val provider = AuthProvider.Email(
isEmailLinkSignInEnabled = true,
emailLinkActionCodeSettings = actionCodeSettings,
passwordValidationRules = emptyList()
)

val result = provider.addSessionInfoToActionCodeSettings(
sessionId = "abc123",
anonymousUserId = ""
)

assertThat(result.linkDomain).isEqualTo("myapp.page.link")
}

@Test
fun `email provider with valid configuration should succeed`() {
val provider = AuthProvider.Email(
Expand Down
Loading