diff --git a/3days/data/src/main/java/com/weave/data/utils/AuthInterceptor.kt b/3days/data/src/main/java/com/weave/data/utils/AuthInterceptor.kt index 6ceb226..c955832 100644 --- a/3days/data/src/main/java/com/weave/data/utils/AuthInterceptor.kt +++ b/3days/data/src/main/java/com/weave/data/utils/AuthInterceptor.kt @@ -102,9 +102,13 @@ class AuthInterceptor @Inject constructor( } } } else { - logDebug { Log.d(TAG, "No auth token available") } - restartApp() - this + if (this.headers.names().contains("X-Register-Token")) { + this + } else { + logDebug { Log.d(TAG, "No auth token available") } + restartApp() + this + } } } diff --git a/3days/feat/intro/src/main/java/com/weave/intro/MobileEnterAuthViewModel.kt b/3days/feat/intro/src/main/java/com/weave/intro/MobileEnterAuthViewModel.kt index fa5e493..c5175a3 100644 --- a/3days/feat/intro/src/main/java/com/weave/intro/MobileEnterAuthViewModel.kt +++ b/3days/feat/intro/src/main/java/com/weave/intro/MobileEnterAuthViewModel.kt @@ -131,10 +131,8 @@ class MobileEnterAuthViewModel @Inject constructor( authCodeId = uiState.authCodeId ?: UUID.fromString(""), verifyCode = inputCode ).mapMerge().collect { if (it != null) { - setState { copy(isVerified = true) } setEffect { AuthEffect.NavigateToRegisterFlow(it.registerToken) } - } else { - setState { copy(errorMessage = context.getString(R.string.mobile_auth_verify_error_message)) } + } else if (!isLoading) { setEffect { AuthEffect.ShowToast( context.getString(R.string.mobile_auth_verify_error_message), @@ -148,10 +146,8 @@ class MobileEnterAuthViewModel @Inject constructor( authCodeId = uiState.authCodeId ?: UUID.fromString(""), verifyCode = inputCode ).mapMerge().collect { if (it != null) { - setState { copy(isVerified = true) } setEffect { AuthEffect.NavigateToMainScreen } - } else { - setState { copy(errorMessage = context.getString(R.string.mobile_auth_verify_error_message)) } + } else if (!isLoading) { setEffect { AuthEffect.ShowToast( context.getString(R.string.mobile_auth_verify_error_message),