Skip to content

Commit

Permalink
fix(datastore): prevent auth plugin from throwing during configuration (
Browse files Browse the repository at this point in the history
#5132)

fix(datastore): prevent auth plugin from throwing during configuration
  • Loading branch information
khatruong2009 committed Jul 10, 2024
1 parent 5dbac2a commit b18b78c
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import android.content.Context
import android.content.Intent
import aws.smithy.kotlin.runtime.time.Instant
import com.amazonaws.amplify.amplify_datastore.pigeons.NativeAuthPlugin
import com.amplifyframework.annotations.InternalAmplifyApi
import com.amplifyframework.auth.AWSCredentials
import com.amplifyframework.auth.AuthCodeDeliveryDetails
import com.amplifyframework.auth.AuthDevice
Expand Down Expand Up @@ -43,6 +44,7 @@ import com.amplifyframework.auth.result.AuthSignUpResult
import com.amplifyframework.auth.result.AuthUpdateAttributeResult
import com.amplifyframework.core.Action
import com.amplifyframework.core.Consumer
import com.amplifyframework.core.configuration.AmplifyOutputsData
import kotlinx.coroutines.MainScope
import kotlinx.coroutines.launch
import org.json.JSONObject
Expand All @@ -66,6 +68,11 @@ class NativeAuthPluginWrapper(
// No-op
}

@InternalAmplifyApi
override fun configure(configuration: AmplifyOutputsData, context: Context) {
// No-op
}

override fun fetchAuthSession(
onSuccess: Consumer<AuthSession>,
onError: Consumer<AuthException>
Expand Down

0 comments on commit b18b78c

Please sign in to comment.