Skip to content

Commit 81c7120

Browse files
committed
refactor: remove isAutoRetrievalEnabled only isInstantVerificationEnabled needed
1 parent e7b752e commit 81c7120

File tree

1 file changed

+12
-18
lines changed
  • auth/src/main/java/com/firebase/ui/auth/compose/configuration/auth_provider

1 file changed

+12
-18
lines changed

auth/src/main/java/com/firebase/ui/auth/compose/configuration/auth_provider/AuthProvider.kt

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ internal enum class Provider(val id: String, val isSocialProvider: Boolean = fal
8787
abstract class OAuthProvider(
8888
override val providerId: String,
8989
open val scopes: List<String> = emptyList(),
90-
open val customParameters: Map<String, String> = emptyMap()
90+
open val customParameters: Map<String, String> = emptyMap(),
9191
) : AuthProvider(providerId)
9292

9393
/**
@@ -123,7 +123,7 @@ abstract class AuthProvider(open val providerId: String) {
123123
internal suspend fun mergeProfile(
124124
auth: FirebaseAuth,
125125
displayName: String?,
126-
photoUri: Uri?
126+
photoUri: Uri?,
127127
) {
128128
try {
129129
val currentUser = auth.currentUser ?: return
@@ -197,7 +197,7 @@ abstract class AuthProvider(open val providerId: String) {
197197
/**
198198
* A list of custom password validation rules.
199199
*/
200-
val passwordValidationRules: List<PasswordRule>
200+
val passwordValidationRules: List<PasswordRule>,
201201
) : AuthProvider(providerId = Provider.EMAIL.id) {
202202
companion object {
203203
const val SESSION_ID_LENGTH = 10
@@ -262,7 +262,7 @@ abstract class AuthProvider(open val providerId: String) {
262262
// For Sign In With Email Link
263263
internal fun isDifferentDevice(
264264
sessionIdFromLocal: String?,
265-
sessionIdFromLink: String
265+
sessionIdFromLink: String,
266266
): Boolean {
267267
return sessionIdFromLocal == null || sessionIdFromLocal.isEmpty()
268268
|| sessionIdFromLink.isEmpty()
@@ -306,12 +306,6 @@ abstract class AuthProvider(open val providerId: String) {
306306
* Enables instant verification of the phone number. Defaults to true.
307307
*/
308308
val isInstantVerificationEnabled: Boolean = true,
309-
310-
/**
311-
* Enables automatic retrieval of the SMS code. Defaults to true.
312-
*/
313-
// TODO(demolaf): is this meant to be isSMSAutoFillInputFieldEnabled?
314-
val isAutoRetrievalEnabled: Boolean = true
315309
) : AuthProvider(providerId = Provider.PHONE.id) {
316310
/**
317311
* Sealed class representing the result of phone number verification.
@@ -462,7 +456,7 @@ abstract class AuthProvider(open val providerId: String) {
462456
/**
463457
* A map of custom OAuth parameters.
464458
*/
465-
override val customParameters: Map<String, String> = emptyMap()
459+
override val customParameters: Map<String, String> = emptyMap(),
466460
) : OAuthProvider(
467461
providerId = Provider.GOOGLE.id,
468462
scopes = scopes,
@@ -514,7 +508,7 @@ abstract class AuthProvider(open val providerId: String) {
514508
/**
515509
* A map of custom OAuth parameters.
516510
*/
517-
override val customParameters: Map<String, String> = emptyMap()
511+
override val customParameters: Map<String, String> = emptyMap(),
518512
) : OAuthProvider(
519513
providerId = Provider.FACEBOOK.id,
520514
scopes = scopes,
@@ -551,7 +545,7 @@ abstract class AuthProvider(open val providerId: String) {
551545
/**
552546
* A map of custom OAuth parameters.
553547
*/
554-
override val customParameters: Map<String, String>
548+
override val customParameters: Map<String, String>,
555549
) : OAuthProvider(
556550
providerId = Provider.TWITTER.id,
557551
customParameters = customParameters
@@ -569,7 +563,7 @@ abstract class AuthProvider(open val providerId: String) {
569563
/**
570564
* A map of custom OAuth parameters.
571565
*/
572-
override val customParameters: Map<String, String>
566+
override val customParameters: Map<String, String>,
573567
) : OAuthProvider(
574568
providerId = Provider.GITHUB.id,
575569
scopes = scopes,
@@ -593,7 +587,7 @@ abstract class AuthProvider(open val providerId: String) {
593587
/**
594588
* A map of custom OAuth parameters.
595589
*/
596-
override val customParameters: Map<String, String>
590+
override val customParameters: Map<String, String>,
597591
) : OAuthProvider(
598592
providerId = Provider.MICROSOFT.id,
599593
scopes = scopes,
@@ -612,7 +606,7 @@ abstract class AuthProvider(open val providerId: String) {
612606
/**
613607
* A map of custom OAuth parameters.
614608
*/
615-
override val customParameters: Map<String, String>
609+
override val customParameters: Map<String, String>,
616610
) : OAuthProvider(
617611
providerId = Provider.YAHOO.id,
618612
scopes = scopes,
@@ -636,7 +630,7 @@ abstract class AuthProvider(open val providerId: String) {
636630
/**
637631
* A map of custom OAuth parameters.
638632
*/
639-
override val customParameters: Map<String, String>
633+
override val customParameters: Map<String, String>,
640634
) : OAuthProvider(
641635
providerId = Provider.APPLE.id,
642636
scopes = scopes,
@@ -694,7 +688,7 @@ abstract class AuthProvider(open val providerId: String) {
694688
/**
695689
* An optional content color for the provider button.
696690
*/
697-
val contentColor: Color?
691+
val contentColor: Color?,
698692
) : OAuthProvider(
699693
providerId = providerId,
700694
scopes = scopes,

0 commit comments

Comments
 (0)