Repo created
This commit is contained in:
parent
75dc487a7a
commit
39c29d175b
6317 changed files with 388324 additions and 2 deletions
22
feature/account/oauth/build.gradle.kts
Normal file
22
feature/account/oauth/build.gradle.kts
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
plugins {
|
||||
id(ThunderbirdPlugins.Library.androidCompose)
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "app.k9mail.feature.account.oauth"
|
||||
resourcePrefix = "account_oauth_"
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation(projects.core.ui.compose.designsystem)
|
||||
implementation(projects.core.common)
|
||||
|
||||
implementation(projects.mail.common)
|
||||
|
||||
implementation(projects.feature.account.common)
|
||||
|
||||
implementation(libs.appauth)
|
||||
implementation(libs.androidx.compose.material3)
|
||||
|
||||
testImplementation(projects.core.ui.compose.testing)
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
package app.k9mail.feature.account.oauth.ui
|
||||
|
||||
import androidx.compose.runtime.Composable
|
||||
import app.k9mail.core.ui.compose.common.annotation.PreviewDevices
|
||||
import app.k9mail.core.ui.compose.designsystem.PreviewWithTheme
|
||||
|
||||
@Composable
|
||||
@PreviewDevices
|
||||
internal fun AccountOAuthContentPreview() {
|
||||
PreviewWithTheme {
|
||||
AccountOAuthContent(
|
||||
state = AccountOAuthContract.State(),
|
||||
onEvent = {},
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
package app.k9mail.feature.account.oauth.ui.fake
|
||||
|
||||
import app.k9mail.core.ui.compose.common.mvi.BaseViewModel
|
||||
import app.k9mail.feature.account.oauth.ui.AccountOAuthContract.Effect
|
||||
import app.k9mail.feature.account.oauth.ui.AccountOAuthContract.Event
|
||||
import app.k9mail.feature.account.oauth.ui.AccountOAuthContract.State
|
||||
import app.k9mail.feature.account.oauth.ui.AccountOAuthContract.ViewModel
|
||||
|
||||
class FakeAccountOAuthViewModel : BaseViewModel<State, Event, Effect>(State()), ViewModel {
|
||||
override fun initState(state: State) = Unit
|
||||
override fun event(event: Event) = Unit
|
||||
}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
package app.k9mail.feature.account.oauth.ui.view
|
||||
|
||||
import androidx.compose.runtime.Composable
|
||||
import app.k9mail.core.ui.compose.common.annotation.PreviewDevices
|
||||
import app.k9mail.core.ui.compose.designsystem.PreviewWithTheme
|
||||
|
||||
@PreviewDevices
|
||||
@Composable
|
||||
internal fun SignInViewPreview() {
|
||||
PreviewWithTheme {
|
||||
SignInView(
|
||||
onSignInClick = {},
|
||||
isGoogleSignIn = false,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@PreviewDevices
|
||||
@Composable
|
||||
internal fun SignInViewWithGooglePreview() {
|
||||
PreviewWithTheme {
|
||||
SignInView(
|
||||
onSignInClick = {},
|
||||
isGoogleSignIn = true,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
package app.k9mail.feature.account.oauth.ui.view
|
||||
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import app.k9mail.core.ui.compose.designsystem.PreviewWithThemes
|
||||
|
||||
@Composable
|
||||
@Preview(showBackground = true)
|
||||
internal fun SignInWithGoogleButtonPreview() {
|
||||
PreviewWithThemes {
|
||||
SignInWithGoogleButton(
|
||||
onClick = {},
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
@Preview(showBackground = true)
|
||||
internal fun SignInWithGoogleButtonDisabledPreview() {
|
||||
PreviewWithThemes {
|
||||
SignInWithGoogleButton(
|
||||
onClick = {},
|
||||
enabled = false,
|
||||
)
|
||||
}
|
||||
}
|
||||
17
feature/account/oauth/src/main/AndroidManifest.xml
Normal file
17
feature/account/oauth/src/main/AndroidManifest.xml
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
>
|
||||
|
||||
<application>
|
||||
|
||||
<!-- We remove this activity entry to avoid all modules depending on this one having to define an override for
|
||||
the manifest placeholder 'appAuthRedirectScheme'. The entry is added back in :app:common -->
|
||||
<activity
|
||||
android:name="net.openid.appauth.RedirectUriReceiverActivity"
|
||||
tools:node="remove"
|
||||
/>
|
||||
|
||||
</application>
|
||||
</manifest>
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
package app.k9mail.feature.account.oauth
|
||||
|
||||
import app.k9mail.feature.account.oauth.data.AuthorizationRepository
|
||||
import app.k9mail.feature.account.oauth.data.AuthorizationStateRepository
|
||||
import app.k9mail.feature.account.oauth.domain.AccountOAuthDomainContract
|
||||
import app.k9mail.feature.account.oauth.domain.AccountOAuthDomainContract.UseCase
|
||||
import app.k9mail.feature.account.oauth.domain.usecase.CheckIsGoogleSignIn
|
||||
import app.k9mail.feature.account.oauth.domain.usecase.FinishOAuthSignIn
|
||||
import app.k9mail.feature.account.oauth.domain.usecase.GetOAuthRequestIntent
|
||||
import app.k9mail.feature.account.oauth.ui.AccountOAuthContract
|
||||
import app.k9mail.feature.account.oauth.ui.AccountOAuthViewModel
|
||||
import net.openid.appauth.AuthorizationService
|
||||
import net.thunderbird.core.common.coreCommonModule
|
||||
import org.koin.android.ext.koin.androidApplication
|
||||
import org.koin.core.module.Module
|
||||
import org.koin.dsl.module
|
||||
|
||||
val featureAccountOAuthModule: Module = module {
|
||||
includes(coreCommonModule)
|
||||
|
||||
factory {
|
||||
AuthorizationService(
|
||||
androidApplication(),
|
||||
)
|
||||
}
|
||||
|
||||
factory<AccountOAuthDomainContract.AuthorizationRepository> {
|
||||
AuthorizationRepository(
|
||||
service = get(),
|
||||
)
|
||||
}
|
||||
|
||||
factory<AccountOAuthDomainContract.AuthorizationStateRepository> {
|
||||
AuthorizationStateRepository()
|
||||
}
|
||||
|
||||
factory<UseCase.GetOAuthRequestIntent> {
|
||||
GetOAuthRequestIntent(
|
||||
repository = get(),
|
||||
configurationProvider = get(),
|
||||
)
|
||||
}
|
||||
|
||||
factory<UseCase.FinishOAuthSignIn> { FinishOAuthSignIn(repository = get()) }
|
||||
|
||||
factory<UseCase.CheckIsGoogleSignIn> { CheckIsGoogleSignIn() }
|
||||
|
||||
factory<AccountOAuthContract.ViewModel> {
|
||||
AccountOAuthViewModel(
|
||||
getOAuthRequestIntent = get(),
|
||||
finishOAuthSignIn = get(),
|
||||
checkIsGoogleSignIn = get(),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
package app.k9mail.feature.account.oauth.data
|
||||
|
||||
import app.k9mail.feature.account.common.domain.entity.AuthorizationState
|
||||
import net.openid.appauth.AuthState
|
||||
import net.thunderbird.core.logging.legacy.Log
|
||||
import org.json.JSONException
|
||||
|
||||
fun AuthState.toAuthorizationState(): AuthorizationState {
|
||||
return try {
|
||||
AuthorizationState(value = jsonSerializeString())
|
||||
} catch (e: JSONException) {
|
||||
Log.e(e, "Error serializing AuthorizationState")
|
||||
AuthorizationState()
|
||||
}
|
||||
}
|
||||
|
||||
fun AuthorizationState.toAuthState(): AuthState {
|
||||
return try {
|
||||
value?.let { AuthState.jsonDeserialize(it) } ?: AuthState()
|
||||
} catch (e: JSONException) {
|
||||
Log.e(e, "Error deserializing AuthorizationState")
|
||||
AuthState()
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,94 @@
|
|||
package app.k9mail.feature.account.oauth.data
|
||||
|
||||
import android.content.Intent
|
||||
import androidx.core.net.toUri
|
||||
import app.k9mail.feature.account.oauth.domain.AccountOAuthDomainContract
|
||||
import app.k9mail.feature.account.oauth.domain.entity.AuthorizationIntentResult
|
||||
import app.k9mail.feature.account.oauth.domain.entity.AuthorizationResult
|
||||
import kotlin.coroutines.resume
|
||||
import kotlin.coroutines.suspendCoroutine
|
||||
import net.openid.appauth.AuthState
|
||||
import net.openid.appauth.AuthorizationException
|
||||
import net.openid.appauth.AuthorizationRequest
|
||||
import net.openid.appauth.AuthorizationResponse
|
||||
import net.openid.appauth.AuthorizationService
|
||||
import net.openid.appauth.AuthorizationServiceConfiguration
|
||||
import net.openid.appauth.CodeVerifierUtil
|
||||
import net.openid.appauth.ResponseTypeValues
|
||||
import net.thunderbird.core.common.oauth.OAuthConfiguration
|
||||
import net.thunderbird.core.logging.legacy.Log
|
||||
|
||||
class AuthorizationRepository(
|
||||
private val service: AuthorizationService,
|
||||
) : AccountOAuthDomainContract.AuthorizationRepository {
|
||||
|
||||
override fun getAuthorizationRequestIntent(
|
||||
configuration: OAuthConfiguration,
|
||||
emailAddress: String,
|
||||
): AuthorizationIntentResult {
|
||||
return AuthorizationIntentResult.Success(
|
||||
createAuthorizationRequestIntent(configuration, emailAddress),
|
||||
)
|
||||
}
|
||||
|
||||
override suspend fun getAuthorizationResponse(intent: Intent): AuthorizationResponse? {
|
||||
return try {
|
||||
AuthorizationResponse.fromIntent(intent)
|
||||
} catch (e: IllegalArgumentException) {
|
||||
Log.e(e, "Error deserializing AuthorizationResponse")
|
||||
null
|
||||
}
|
||||
}
|
||||
|
||||
override suspend fun getAuthorizationException(intent: Intent): AuthorizationException? {
|
||||
return try {
|
||||
AuthorizationException.fromIntent(intent)
|
||||
} catch (e: IllegalArgumentException) {
|
||||
Log.e(e, "Error deserializing AuthorizationException")
|
||||
null
|
||||
}
|
||||
}
|
||||
|
||||
override suspend fun getExchangeToken(
|
||||
response: AuthorizationResponse,
|
||||
): AuthorizationResult = suspendCoroutine { continuation ->
|
||||
val tokenRequest = response.createTokenExchangeRequest()
|
||||
|
||||
service.performTokenRequest(tokenRequest) { tokenResponse, authorizationException ->
|
||||
val result = if (authorizationException != null) {
|
||||
AuthorizationResult.Failure(authorizationException)
|
||||
} else if (tokenResponse != null) {
|
||||
val authState = AuthState(response, tokenResponse, null)
|
||||
AuthorizationResult.Success(authState.toAuthorizationState())
|
||||
} else {
|
||||
AuthorizationResult.Failure(Exception("Unknown error"))
|
||||
}
|
||||
|
||||
continuation.resume(result)
|
||||
}
|
||||
}
|
||||
|
||||
private fun createAuthorizationRequestIntent(configuration: OAuthConfiguration, emailAddress: String): Intent {
|
||||
val serviceConfig = AuthorizationServiceConfiguration(
|
||||
configuration.authorizationEndpoint.toUri(),
|
||||
configuration.tokenEndpoint.toUri(),
|
||||
)
|
||||
|
||||
val authRequestBuilder = AuthorizationRequest.Builder(
|
||||
serviceConfig,
|
||||
configuration.clientId,
|
||||
ResponseTypeValues.CODE,
|
||||
configuration.redirectUri.toUri(),
|
||||
)
|
||||
|
||||
val codeVerifier = CodeVerifierUtil.generateRandomCodeVerifier()
|
||||
|
||||
val authRequest = authRequestBuilder
|
||||
.setScope(configuration.scopes.joinToString(" "))
|
||||
.setCodeVerifier(codeVerifier)
|
||||
.setLoginHint(emailAddress)
|
||||
.build()
|
||||
|
||||
return service.getAuthorizationRequestIntent(authRequest)
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
package app.k9mail.feature.account.oauth.data
|
||||
|
||||
import app.k9mail.feature.account.common.domain.entity.AuthorizationState
|
||||
import app.k9mail.feature.account.oauth.domain.AccountOAuthDomainContract
|
||||
|
||||
class AuthorizationStateRepository : AccountOAuthDomainContract.AuthorizationStateRepository {
|
||||
override fun isAuthorized(authorizationState: AuthorizationState): Boolean {
|
||||
val authState = authorizationState.toAuthState()
|
||||
|
||||
return authState.isAuthorized
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
package app.k9mail.feature.account.oauth.domain
|
||||
|
||||
import android.content.Intent
|
||||
import app.k9mail.feature.account.common.domain.entity.AuthorizationState
|
||||
import app.k9mail.feature.account.oauth.domain.entity.AuthorizationIntentResult
|
||||
import app.k9mail.feature.account.oauth.domain.entity.AuthorizationResult
|
||||
import net.openid.appauth.AuthorizationException
|
||||
import net.openid.appauth.AuthorizationResponse
|
||||
import net.thunderbird.core.common.oauth.OAuthConfiguration
|
||||
|
||||
interface AccountOAuthDomainContract {
|
||||
|
||||
interface UseCase {
|
||||
fun interface GetOAuthRequestIntent {
|
||||
fun execute(hostname: String, emailAddress: String): AuthorizationIntentResult
|
||||
}
|
||||
|
||||
fun interface FinishOAuthSignIn {
|
||||
suspend fun execute(intent: Intent): AuthorizationResult
|
||||
}
|
||||
|
||||
fun interface CheckIsGoogleSignIn {
|
||||
fun execute(hostname: String): Boolean
|
||||
}
|
||||
}
|
||||
|
||||
interface AuthorizationRepository {
|
||||
fun getAuthorizationRequestIntent(
|
||||
configuration: OAuthConfiguration,
|
||||
emailAddress: String,
|
||||
): AuthorizationIntentResult
|
||||
|
||||
suspend fun getAuthorizationResponse(intent: Intent): AuthorizationResponse?
|
||||
suspend fun getAuthorizationException(intent: Intent): AuthorizationException?
|
||||
|
||||
suspend fun getExchangeToken(response: AuthorizationResponse): AuthorizationResult
|
||||
}
|
||||
|
||||
fun interface AuthorizationStateRepository {
|
||||
fun isAuthorized(authorizationState: AuthorizationState): Boolean
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
package app.k9mail.feature.account.oauth.domain.entity
|
||||
|
||||
import android.content.Intent
|
||||
|
||||
sealed interface AuthorizationIntentResult {
|
||||
object NotSupported : AuthorizationIntentResult
|
||||
|
||||
data class Success(
|
||||
val intent: Intent,
|
||||
) : AuthorizationIntentResult
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package app.k9mail.feature.account.oauth.domain.entity
|
||||
|
||||
import app.k9mail.feature.account.common.domain.entity.AuthorizationState
|
||||
|
||||
sealed interface AuthorizationResult {
|
||||
|
||||
data class Success(
|
||||
val state: AuthorizationState,
|
||||
) : AuthorizationResult
|
||||
|
||||
data class Failure(
|
||||
val error: Exception,
|
||||
) : AuthorizationResult
|
||||
|
||||
object BrowserNotAvailable : AuthorizationResult
|
||||
|
||||
object Canceled : AuthorizationResult
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
package app.k9mail.feature.account.oauth.domain.entity
|
||||
|
||||
import app.k9mail.feature.account.common.domain.entity.AuthorizationState
|
||||
|
||||
sealed interface OAuthResult {
|
||||
data class Success(
|
||||
val authorizationState: AuthorizationState,
|
||||
) : OAuthResult
|
||||
|
||||
object Failure : OAuthResult
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
package app.k9mail.feature.account.oauth.domain.entity
|
||||
|
||||
import com.fsck.k9.mail.AuthType
|
||||
import com.fsck.k9.mail.ServerSettings
|
||||
|
||||
fun ServerSettings?.isOAuth() = this?.authenticationType == AuthType.XOAUTH2
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
package app.k9mail.feature.account.oauth.domain.usecase
|
||||
|
||||
import app.k9mail.feature.account.oauth.domain.AccountOAuthDomainContract.UseCase
|
||||
|
||||
internal class CheckIsGoogleSignIn : UseCase.CheckIsGoogleSignIn {
|
||||
override fun execute(hostname: String): Boolean {
|
||||
for (domain in domainList) {
|
||||
if (hostname.lowercase().endsWith(domain)) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
private companion object {
|
||||
val domainList = listOf(
|
||||
".gmail.com",
|
||||
".googlemail.com",
|
||||
".google.com",
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
package app.k9mail.feature.account.oauth.domain.usecase
|
||||
|
||||
import android.content.Intent
|
||||
import app.k9mail.feature.account.oauth.domain.AccountOAuthDomainContract
|
||||
import app.k9mail.feature.account.oauth.domain.AccountOAuthDomainContract.UseCase
|
||||
import app.k9mail.feature.account.oauth.domain.entity.AuthorizationResult
|
||||
|
||||
class FinishOAuthSignIn(
|
||||
private val repository: AccountOAuthDomainContract.AuthorizationRepository,
|
||||
) : UseCase.FinishOAuthSignIn {
|
||||
override suspend fun execute(intent: Intent): AuthorizationResult {
|
||||
val response = repository.getAuthorizationResponse(intent)
|
||||
val exception = repository.getAuthorizationException(intent)
|
||||
|
||||
return if (response != null) {
|
||||
repository.getExchangeToken(response)
|
||||
} else if (exception != null) {
|
||||
AuthorizationResult.Failure(exception)
|
||||
} else {
|
||||
AuthorizationResult.Canceled
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package app.k9mail.feature.account.oauth.domain.usecase
|
||||
|
||||
import app.k9mail.feature.account.oauth.domain.AccountOAuthDomainContract
|
||||
import app.k9mail.feature.account.oauth.domain.AccountOAuthDomainContract.UseCase.GetOAuthRequestIntent
|
||||
import app.k9mail.feature.account.oauth.domain.entity.AuthorizationIntentResult
|
||||
import net.thunderbird.core.common.oauth.OAuthConfigurationProvider
|
||||
|
||||
internal class GetOAuthRequestIntent(
|
||||
private val repository: AccountOAuthDomainContract.AuthorizationRepository,
|
||||
private val configurationProvider: OAuthConfigurationProvider,
|
||||
) : GetOAuthRequestIntent {
|
||||
override fun execute(hostname: String, emailAddress: String): AuthorizationIntentResult {
|
||||
val configuration = configurationProvider.getConfiguration(hostname)
|
||||
?: return AuthorizationIntentResult.NotSupported
|
||||
|
||||
return repository.getAuthorizationRequestIntent(configuration, emailAddress)
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
package app.k9mail.feature.account.oauth.ui
|
||||
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import app.k9mail.core.ui.compose.designsystem.molecule.ErrorView
|
||||
import app.k9mail.core.ui.compose.designsystem.molecule.LoadingView
|
||||
import app.k9mail.core.ui.compose.theme2.MainTheme
|
||||
import app.k9mail.feature.account.oauth.R
|
||||
import app.k9mail.feature.account.oauth.ui.AccountOAuthContract.Event
|
||||
import app.k9mail.feature.account.oauth.ui.AccountOAuthContract.State
|
||||
import app.k9mail.feature.account.oauth.ui.view.GoogleSignInSupportText
|
||||
import app.k9mail.feature.account.oauth.ui.view.SignInView
|
||||
import net.thunderbird.core.ui.compose.common.modifier.testTagAsResourceId
|
||||
|
||||
@Composable
|
||||
internal fun AccountOAuthContent(
|
||||
state: State,
|
||||
onEvent: (Event) -> Unit,
|
||||
modifier: Modifier = Modifier,
|
||||
isEnabled: Boolean = true,
|
||||
) {
|
||||
val resources = LocalContext.current.resources
|
||||
|
||||
Column(
|
||||
modifier = Modifier
|
||||
.testTagAsResourceId("AccountOAuthContent")
|
||||
.then(modifier),
|
||||
verticalArrangement = Arrangement.spacedBy(MainTheme.spacings.double, Alignment.CenterVertically),
|
||||
) {
|
||||
if (state.isLoading) {
|
||||
LoadingView(
|
||||
message = stringResource(id = R.string.account_oauth_loading_message),
|
||||
)
|
||||
} else if (state.error != null) {
|
||||
Column {
|
||||
ErrorView(
|
||||
title = stringResource(id = R.string.account_oauth_loading_error),
|
||||
message = state.error.toResourceString(resources),
|
||||
onRetry = { onEvent(Event.OnRetryClicked) },
|
||||
)
|
||||
|
||||
if (state.isGoogleSignIn) {
|
||||
GoogleSignInSupportText()
|
||||
}
|
||||
}
|
||||
} else {
|
||||
SignInView(
|
||||
onSignInClick = { onEvent(Event.SignInClicked) },
|
||||
isGoogleSignIn = state.isGoogleSignIn,
|
||||
isEnabled = isEnabled,
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
package app.k9mail.feature.account.oauth.ui
|
||||
|
||||
import android.content.Intent
|
||||
import app.k9mail.core.ui.compose.common.mvi.UnidirectionalViewModel
|
||||
import app.k9mail.feature.account.common.domain.entity.AuthorizationState
|
||||
import app.k9mail.feature.account.common.ui.WizardNavigationBarState
|
||||
|
||||
interface AccountOAuthContract {
|
||||
|
||||
interface ViewModel : UnidirectionalViewModel<State, Event, Effect> {
|
||||
fun initState(state: State)
|
||||
}
|
||||
|
||||
data class State(
|
||||
val hostname: String = "",
|
||||
val emailAddress: String = "",
|
||||
val wizardNavigationBarState: WizardNavigationBarState = WizardNavigationBarState(
|
||||
isNextEnabled = false,
|
||||
),
|
||||
val isGoogleSignIn: Boolean = false,
|
||||
val error: Error? = null,
|
||||
val isLoading: Boolean = false,
|
||||
)
|
||||
|
||||
sealed interface Event {
|
||||
data class OnOAuthResult(
|
||||
val resultCode: Int,
|
||||
val data: Intent?,
|
||||
) : Event
|
||||
|
||||
object SignInClicked : Event
|
||||
object OnBackClicked : Event
|
||||
object OnRetryClicked : Event
|
||||
}
|
||||
|
||||
sealed interface Effect {
|
||||
data class LaunchOAuth(
|
||||
val intent: Intent,
|
||||
) : Effect
|
||||
|
||||
data class NavigateNext(
|
||||
val state: AuthorizationState,
|
||||
) : Effect
|
||||
object NavigateBack : Effect
|
||||
}
|
||||
|
||||
sealed interface Error {
|
||||
object NotSupported : Error
|
||||
object Canceled : Error
|
||||
|
||||
object BrowserNotAvailable : Error
|
||||
data class Unknown(val error: Exception) : Error
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
package app.k9mail.feature.account.oauth.ui
|
||||
|
||||
import android.content.res.Resources
|
||||
import app.k9mail.feature.account.oauth.R
|
||||
import app.k9mail.feature.account.oauth.ui.AccountOAuthContract.Error
|
||||
|
||||
internal fun Error.toResourceString(resources: Resources): String {
|
||||
return when (this) {
|
||||
Error.BrowserNotAvailable -> resources.getString(R.string.account_oauth_error_browser_not_available)
|
||||
Error.Canceled -> resources.getString(R.string.account_oauth_error_canceled)
|
||||
Error.NotSupported -> resources.getString(R.string.account_oauth_error_not_supported)
|
||||
is Error.Unknown -> resources.getString(R.string.account_oauth_error_failed, error.message)
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
package app.k9mail.feature.account.oauth.ui
|
||||
|
||||
import androidx.activity.compose.rememberLauncherForActivityResult
|
||||
import androidx.activity.result.contract.ActivityResultContracts
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import app.k9mail.core.ui.compose.common.mvi.observe
|
||||
import app.k9mail.feature.account.oauth.domain.entity.OAuthResult
|
||||
import app.k9mail.feature.account.oauth.ui.AccountOAuthContract.Effect
|
||||
import app.k9mail.feature.account.oauth.ui.AccountOAuthContract.Event
|
||||
import app.k9mail.feature.account.oauth.ui.AccountOAuthContract.ViewModel
|
||||
|
||||
@Composable
|
||||
fun AccountOAuthView(
|
||||
onOAuthResult: (OAuthResult) -> Unit,
|
||||
viewModel: ViewModel,
|
||||
modifier: Modifier = Modifier,
|
||||
isEnabled: Boolean = true,
|
||||
) {
|
||||
val oAuthLauncher = rememberLauncherForActivityResult(
|
||||
contract = ActivityResultContracts.StartActivityForResult(),
|
||||
) {
|
||||
viewModel.event(Event.OnOAuthResult(it.resultCode, it.data))
|
||||
}
|
||||
|
||||
val (state, dispatch) = viewModel.observe { effect ->
|
||||
when (effect) {
|
||||
is Effect.NavigateNext -> onOAuthResult(OAuthResult.Success(effect.state))
|
||||
is Effect.NavigateBack -> onOAuthResult(OAuthResult.Failure)
|
||||
is Effect.LaunchOAuth -> oAuthLauncher.launch(effect.intent)
|
||||
}
|
||||
}
|
||||
|
||||
AccountOAuthContent(
|
||||
state = state.value,
|
||||
onEvent = { dispatch(it) },
|
||||
modifier = modifier,
|
||||
isEnabled = isEnabled,
|
||||
)
|
||||
}
|
||||
|
|
@ -0,0 +1,120 @@
|
|||
package app.k9mail.feature.account.oauth.ui
|
||||
|
||||
import android.app.Activity
|
||||
import android.content.Intent
|
||||
import androidx.lifecycle.viewModelScope
|
||||
import app.k9mail.core.ui.compose.common.mvi.BaseViewModel
|
||||
import app.k9mail.feature.account.common.domain.entity.AuthorizationState
|
||||
import app.k9mail.feature.account.oauth.domain.AccountOAuthDomainContract.UseCase
|
||||
import app.k9mail.feature.account.oauth.domain.entity.AuthorizationIntentResult
|
||||
import app.k9mail.feature.account.oauth.domain.entity.AuthorizationResult
|
||||
import app.k9mail.feature.account.oauth.ui.AccountOAuthContract.Effect
|
||||
import app.k9mail.feature.account.oauth.ui.AccountOAuthContract.Error
|
||||
import app.k9mail.feature.account.oauth.ui.AccountOAuthContract.Event
|
||||
import app.k9mail.feature.account.oauth.ui.AccountOAuthContract.State
|
||||
import app.k9mail.feature.account.oauth.ui.AccountOAuthContract.ViewModel
|
||||
import kotlinx.coroutines.launch
|
||||
|
||||
class AccountOAuthViewModel(
|
||||
initialState: State = State(),
|
||||
private val getOAuthRequestIntent: UseCase.GetOAuthRequestIntent,
|
||||
private val finishOAuthSignIn: UseCase.FinishOAuthSignIn,
|
||||
private val checkIsGoogleSignIn: UseCase.CheckIsGoogleSignIn,
|
||||
) : BaseViewModel<State, Event, Effect>(initialState), ViewModel {
|
||||
|
||||
override fun initState(state: State) {
|
||||
val isGoogleSignIn = checkIsGoogleSignIn.execute(state.hostname)
|
||||
|
||||
updateState {
|
||||
state.copy(
|
||||
isGoogleSignIn = isGoogleSignIn,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
override fun event(event: Event) {
|
||||
when (event) {
|
||||
is Event.OnOAuthResult -> onOAuthResult(event.resultCode, event.data)
|
||||
|
||||
Event.SignInClicked -> onSignIn()
|
||||
|
||||
Event.OnBackClicked -> navigateBack()
|
||||
|
||||
Event.OnRetryClicked -> onRetry()
|
||||
}
|
||||
}
|
||||
|
||||
private fun onSignIn() {
|
||||
val result = getOAuthRequestIntent.execute(
|
||||
hostname = state.value.hostname,
|
||||
emailAddress = state.value.emailAddress,
|
||||
)
|
||||
|
||||
when (result) {
|
||||
AuthorizationIntentResult.NotSupported -> {
|
||||
updateState { state ->
|
||||
state.copy(
|
||||
error = Error.NotSupported,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
is AuthorizationIntentResult.Success -> {
|
||||
emitEffect(Effect.LaunchOAuth(result.intent))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun onRetry() {
|
||||
updateState { state ->
|
||||
state.copy(
|
||||
error = null,
|
||||
)
|
||||
}
|
||||
onSignIn()
|
||||
}
|
||||
|
||||
private fun onOAuthResult(resultCode: Int, data: Intent?) {
|
||||
if (resultCode == Activity.RESULT_OK && data != null) {
|
||||
finishSignIn(data)
|
||||
} else {
|
||||
updateState { state ->
|
||||
state.copy(error = Error.Canceled)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun finishSignIn(data: Intent) {
|
||||
updateState { state ->
|
||||
state.copy(
|
||||
isLoading = true,
|
||||
)
|
||||
}
|
||||
viewModelScope.launch {
|
||||
when (val result = finishOAuthSignIn.execute(data)) {
|
||||
AuthorizationResult.BrowserNotAvailable -> updateErrorState(Error.BrowserNotAvailable)
|
||||
AuthorizationResult.Canceled -> updateErrorState(Error.Canceled)
|
||||
is AuthorizationResult.Failure -> updateErrorState(Error.Unknown(result.error))
|
||||
is AuthorizationResult.Success -> {
|
||||
updateState { state ->
|
||||
state.copy(isLoading = false)
|
||||
}
|
||||
navigateNext(authorizationState = result.state)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun updateErrorState(error: Error) = updateState { state ->
|
||||
state.copy(
|
||||
error = error,
|
||||
isLoading = false,
|
||||
)
|
||||
}
|
||||
|
||||
private fun navigateBack() = emitEffect(Effect.NavigateBack)
|
||||
|
||||
private fun navigateNext(authorizationState: AuthorizationState) {
|
||||
emitEffect(Effect.NavigateNext(authorizationState))
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
package app.k9mail.feature.account.oauth.ui.view
|
||||
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.text.LinkAnnotation
|
||||
import androidx.compose.ui.text.SpanStyle
|
||||
import androidx.compose.ui.text.buildAnnotatedString
|
||||
import androidx.compose.ui.text.style.TextAlign
|
||||
import androidx.compose.ui.text.style.TextDecoration
|
||||
import androidx.compose.ui.text.withLink
|
||||
import androidx.compose.ui.text.withStyle
|
||||
import app.k9mail.core.ui.compose.common.resources.annotatedStringResource
|
||||
import app.k9mail.core.ui.compose.designsystem.atom.text.TextBodySmall
|
||||
import app.k9mail.core.ui.compose.theme2.MainTheme
|
||||
import app.k9mail.feature.account.oauth.R
|
||||
|
||||
private const val GOOGLE_OAUTH_SUPPORT_PAGE = "https://support.thunderbird.net/kb/gmail-thunderbird-android"
|
||||
|
||||
@Composable
|
||||
internal fun GoogleSignInSupportText() {
|
||||
val extraText = annotatedStringResource(
|
||||
id = R.string.account_oauth_google_sign_in_support_text,
|
||||
argument = buildAnnotatedString {
|
||||
withStyle(
|
||||
style = SpanStyle(
|
||||
color = MainTheme.colors.primary,
|
||||
textDecoration = TextDecoration.Underline,
|
||||
),
|
||||
) {
|
||||
withLink(LinkAnnotation.Url(GOOGLE_OAUTH_SUPPORT_PAGE)) {
|
||||
append(stringResource(R.string.account_oauth_google_sign_in_support_text_link_text))
|
||||
}
|
||||
}
|
||||
},
|
||||
)
|
||||
|
||||
TextBodySmall(
|
||||
text = extraText,
|
||||
textAlign = TextAlign.Center,
|
||||
)
|
||||
}
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
package app.k9mail.feature.account.oauth.ui.view
|
||||
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.text.style.TextAlign
|
||||
import app.k9mail.core.ui.compose.designsystem.atom.button.ButtonFilled
|
||||
import app.k9mail.core.ui.compose.designsystem.atom.text.TextBodySmall
|
||||
import app.k9mail.core.ui.compose.theme2.MainTheme
|
||||
import app.k9mail.feature.account.oauth.R
|
||||
|
||||
@Composable
|
||||
internal fun SignInView(
|
||||
onSignInClick: () -> Unit,
|
||||
isGoogleSignIn: Boolean,
|
||||
modifier: Modifier = Modifier,
|
||||
isEnabled: Boolean = true,
|
||||
) {
|
||||
Column(
|
||||
horizontalAlignment = Alignment.CenterHorizontally,
|
||||
verticalArrangement = Arrangement.spacedBy(MainTheme.spacings.double),
|
||||
modifier = modifier,
|
||||
) {
|
||||
TextBodySmall(
|
||||
text = stringResource(id = R.string.account_oauth_sign_in_description),
|
||||
textAlign = TextAlign.Center,
|
||||
)
|
||||
|
||||
if (isGoogleSignIn) {
|
||||
SignInWithGoogleButton(
|
||||
onClick = onSignInClick,
|
||||
enabled = isEnabled,
|
||||
)
|
||||
|
||||
GoogleSignInSupportText()
|
||||
} else {
|
||||
ButtonFilled(
|
||||
text = stringResource(id = R.string.account_oauth_sign_in_button),
|
||||
onClick = onSignInClick,
|
||||
enabled = isEnabled,
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,123 @@
|
|||
package app.k9mail.feature.account.oauth.ui.view
|
||||
|
||||
import androidx.compose.animation.animateContentSize
|
||||
import androidx.compose.animation.core.LinearOutSlowInEasing
|
||||
import androidx.compose.animation.core.tween
|
||||
import androidx.compose.foundation.BorderStroke
|
||||
import androidx.compose.foundation.isSystemInDarkTheme
|
||||
import androidx.compose.foundation.layout.PaddingValues
|
||||
import androidx.compose.foundation.layout.Row
|
||||
import androidx.compose.foundation.layout.Spacer
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.layout.requiredWidth
|
||||
import androidx.compose.material3.ButtonDefaults
|
||||
import androidx.compose.material3.Icon
|
||||
import androidx.compose.material3.Surface
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.res.painterResource
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.text.TextStyle
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import app.k9mail.feature.account.oauth.R
|
||||
import androidx.compose.material3.Button as Material3Button
|
||||
|
||||
/**
|
||||
* A sign in with Google button, following the Google Branding Guidelines.
|
||||
*
|
||||
* @see [Google Branding Guidelines](https://developers.google.com/identity/branding-guidelines)
|
||||
*/
|
||||
@Suppress("LongMethod")
|
||||
@Composable
|
||||
fun SignInWithGoogleButton(
|
||||
onClick: () -> Unit,
|
||||
modifier: Modifier = Modifier,
|
||||
enabled: Boolean = true,
|
||||
isDark: Boolean = isSystemInDarkTheme(),
|
||||
) {
|
||||
Material3Button(
|
||||
onClick = onClick,
|
||||
modifier = modifier,
|
||||
colors = ButtonDefaults.buttonColors(
|
||||
contentColor = getTextColor(isDark),
|
||||
containerColor = getSurfaceColor(isDark),
|
||||
),
|
||||
border = BorderStroke(
|
||||
width = 1.dp,
|
||||
color = getBorderColor(isDark),
|
||||
),
|
||||
contentPadding = PaddingValues(all = 0.dp),
|
||||
enabled = enabled,
|
||||
) {
|
||||
Row(
|
||||
modifier = Modifier
|
||||
.animateContentSize(
|
||||
animationSpec = tween(
|
||||
durationMillis = 300,
|
||||
easing = LinearOutSlowInEasing,
|
||||
),
|
||||
)
|
||||
.padding(
|
||||
end = 8.dp,
|
||||
),
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
) {
|
||||
Surface(
|
||||
color = Color.White,
|
||||
) {
|
||||
Icon(
|
||||
modifier = Modifier
|
||||
.padding(8.dp),
|
||||
painter = painterResource(
|
||||
id = R.drawable.account_oauth_ic_google_logo,
|
||||
),
|
||||
contentDescription = "Google logo",
|
||||
tint = Color.Unspecified,
|
||||
)
|
||||
}
|
||||
Spacer(modifier = Modifier.requiredWidth(8.dp))
|
||||
Text(
|
||||
text = stringResource(
|
||||
id = R.string.account_oauth_sign_in_with_google_button,
|
||||
),
|
||||
style = TextStyle(
|
||||
fontWeight = FontWeight.Medium,
|
||||
fontSize = 14.sp,
|
||||
letterSpacing = 1.25.sp,
|
||||
),
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("MagicNumber")
|
||||
private fun getBorderColor(isDark: Boolean): Color {
|
||||
return if (isDark) {
|
||||
Color(0xFF4285F4)
|
||||
} else {
|
||||
Color(0x87000000)
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("MagicNumber")
|
||||
private fun getSurfaceColor(isDark: Boolean): Color {
|
||||
return if (isDark) {
|
||||
Color(0xFF4285F4)
|
||||
} else {
|
||||
Color(0xFFFFFFFF)
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("MagicNumber")
|
||||
private fun getTextColor(isDark: Boolean): Color {
|
||||
return if (isDark) {
|
||||
Color(0xFFFFFFFF)
|
||||
} else {
|
||||
Color(0x87000000)
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
<vector
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
>
|
||||
<path
|
||||
android:pathData="M21.7428,12.2242a11.534,11.534 0,0 0,-0.158 -1.883h-9.375v3.742h5.368a4.622,4.622 0,0 1,-1.991 2.97L15.5868,19.5422h3.2A9.734,9.734 0,0 0,21.7428 12.2242Z"
|
||||
android:fillColor="#4285f4"
|
||||
/>
|
||||
<path
|
||||
android:pathData="M12.2098,21.9562A9.483,9.483 0,0 0,18.7888 19.5412l-3.2,-2.489a6.006,6.006 0,0 1,-3.377 0.962,5.946 5.946,0 0,1 -5.583,-4.115h-3.3v2.564A9.941,9.941 0,0 0,12.2098 21.9562Z"
|
||||
android:fillColor="#34a853"
|
||||
/>
|
||||
<path
|
||||
android:pathData="M6.6268,13.9002a5.777,5.777 0,0 1,-0.315 -1.9,6 6,0 0,1 0.315,-1.9L6.6268,7.5372h-3.3a9.84,9.84 0,0 0,-1.07 4.463,9.84 9.84,0 0,0 1.07,4.463Z"
|
||||
android:fillColor="#fbbc05"
|
||||
/>
|
||||
<path
|
||||
android:pathData="M12.2098,5.9862a5.4,5.4 0,0 1,3.816 1.493l2.837,-2.837a9.518,9.518 0,0 0,-6.654 -2.6,9.941 9.941,0 0,0 -8.885,5.492l3.3,2.564A5.946,5.946 0,0 1,12.2098 5.9862Z"
|
||||
android:fillColor="#ea4335"
|
||||
/>
|
||||
</vector>
|
||||
2
feature/account/oauth/src/main/res/values-am/strings.xml
Normal file
2
feature/account/oauth/src/main/res/values-am/strings.xml
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources></resources>
|
||||
14
feature/account/oauth/src/main/res/values-ar/strings.xml
Normal file
14
feature/account/oauth/src/main/res/values-ar/strings.xml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<string name="account_oauth_sign_in_button">تسجيل الدخول</string>
|
||||
<string name="account_oauth_sign_in_with_google_button">تسجيل الدخول باستخدام جوجل</string>
|
||||
<string name="account_oauth_sign_in_description">سيتم إعادة توجيهك إلى مزود البريد الإلكتروني الخاص بك لتقوم بتسجيل الدخول. تحتاج إلى منح التطبيق إمكانية الوصول إلى حساب بريدك الإلكتروني.</string>
|
||||
<string name="account_oauth_loading_message">يتم الآن تسجيل الدخول باستخدام OAuth</string>
|
||||
<string name="account_oauth_loading_error">فشل تسجيل الدخول باستخدام OAuth</string>
|
||||
<string name="account_oauth_error_browser_not_available">لم يتمكن التطبيق من العثور على متصفح لاستخدامه لمنح الوصول إلى حسابك.</string>
|
||||
<string name="account_oauth_error_canceled">تم إلغاء التفويض</string>
|
||||
<string name="account_oauth_error_not_supported">استخدام OAuth 2.0 مع هذا المزود غير مدعوم حاليًا.</string>
|
||||
<string name="account_oauth_error_failed">فشل التفويض مع الخطأ التالي: <xliff:g id="error">%s</xliff:g></string>
|
||||
<string name="account_oauth_google_sign_in_support_text">إذا واجهت مشاكل عند تسجيل الدخول باستخدام جوجل، فيُرجى الرجوع إلى {placeHolder}.</string>
|
||||
<string name="account_oauth_google_sign_in_support_text_link_text">مقالة الدعم</string>
|
||||
</resources>
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources></resources>
|
||||
2
feature/account/oauth/src/main/res/values-az/strings.xml
Normal file
2
feature/account/oauth/src/main/res/values-az/strings.xml
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources></resources>
|
||||
5
feature/account/oauth/src/main/res/values-be/strings.xml
Normal file
5
feature/account/oauth/src/main/res/values-be/strings.xml
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="account_oauth_sign_in_button">Увайсці</string>
|
||||
<string name="account_oauth_sign_in_description">Мы перанакіруем вас на старонку вашага пастаўшчыка паслуг электроннай пошты для ўваходу. Вам трэба даць праграме доступ да вашага ўліковага запісу электроннай пошты.</string>
|
||||
</resources>
|
||||
14
feature/account/oauth/src/main/res/values-bg/strings.xml
Normal file
14
feature/account/oauth/src/main/res/values-bg/strings.xml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<string name="account_oauth_sign_in_with_google_button">Вписване чрез Google</string>
|
||||
<string name="account_oauth_loading_error">Вписването чрез OAuth се провали</string>
|
||||
<string name="account_oauth_error_failed">Разрешаването се провали и даде следната грешка: <xliff:g id="error">%s</xliff:g></string>
|
||||
<string name="account_oauth_error_browser_not_available">Приложението не успя да намери браузър, който да използва за разрешаване на достъп до акаунта Ви.</string>
|
||||
<string name="account_oauth_error_not_supported">OAuth 2.0 с този доставчик не се поддържа в момента.</string>
|
||||
<string name="account_oauth_error_canceled">Разрешението е отменено</string>
|
||||
<string name="account_oauth_loading_message">Вписване чрез OAuth</string>
|
||||
<string name="account_oauth_sign_in_description">Пренасочваме ви към вашият доставчик на имейл услуги. Трябва да дадете на приложението достъп до профила си.</string>
|
||||
<string name="account_oauth_sign_in_button">Вписване</string>
|
||||
<string name="account_oauth_google_sign_in_support_text_link_text">статия за поддръжка</string>
|
||||
<string name="account_oauth_google_sign_in_support_text">Ако имате проблеми при влизането с Google, моля, консултирайте се с нашия {placeHolder}.</string>
|
||||
</resources>
|
||||
2
feature/account/oauth/src/main/res/values-bn/strings.xml
Normal file
2
feature/account/oauth/src/main/res/values-bn/strings.xml
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources></resources>
|
||||
14
feature/account/oauth/src/main/res/values-br/strings.xml
Normal file
14
feature/account/oauth/src/main/res/values-br/strings.xml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<string name="account_oauth_google_sign_in_support_text">M\'ho peus kudennoù o kennaskañ gant Google, lennit hor {placeHolder}.</string>
|
||||
<string name="account_oauth_sign_in_description">Adheñchañ a raimp ac\'hanoc\'h etrezek ho pourchaser posteloù evit kennaskañ. Dav vo deoc\'h aotren an arload da haeziñ ho kont posteloù.</string>
|
||||
<string name="account_oauth_sign_in_button">Kennsakañ</string>
|
||||
<string name="account_oauth_sign_in_with_google_button">Kennaskañ gant Google</string>
|
||||
<string name="account_oauth_loading_message">Kennaskañ gant OAuth</string>
|
||||
<string name="account_oauth_loading_error">Fazi en ur gennaskañ ouzh OAuth</string>
|
||||
<string name="account_oauth_error_canceled">Nullet eo bet an aotre</string>
|
||||
<string name="account_oauth_error_failed">C\'hwitet war an aotre gant ar fazi da-heul: <xliff:g id="error">%s</xliff:g></string>
|
||||
<string name="account_oauth_error_not_supported">OAuth n\'eo ket skoret gant ar pourchaser-mañ.</string>
|
||||
<string name="account_oauth_error_browser_not_available">An arload-mañ n\'hall ket kavout ar merdeer evit aotren an haeziñ war ho kont.</string>
|
||||
<string name="account_oauth_google_sign_in_support_text_link_text">pennad skoazell</string>
|
||||
</resources>
|
||||
12
feature/account/oauth/src/main/res/values-bs/strings.xml
Normal file
12
feature/account/oauth/src/main/res/values-bs/strings.xml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<string name="account_oauth_sign_in_button">Prijavite se</string>
|
||||
<string name="account_oauth_sign_in_with_google_button">Prijavite se pomoću Google-a</string>
|
||||
<string name="account_oauth_error_not_supported">OAuth 2.0 trenutno nije podržan od strane ovog provajdera.</string>
|
||||
<string name="account_oauth_error_browser_not_available">Ova aplikacija nije mogla pronaći pretraživač kojim bi dali pristup vašem računu.</string>
|
||||
<string name="account_oauth_loading_message">Prijavite se pomoću OAuth protokola</string>
|
||||
<string name="account_oauth_loading_error">OAuth prijavljivanje neuspjelo</string>
|
||||
<string name="account_oauth_error_canceled">Autorizacija otkazana</string>
|
||||
<string name="account_oauth_sign_in_description">Preusmjerit ćemo vas na vašeg provajdera e-pošte da se prijavite. Morate odobriti aplikaciji pristup vašem računu e-pošte.</string>
|
||||
<string name="account_oauth_error_failed">Autorizacija neuspjela iz sljedećeg razloga: <xliff:g id="error">%s</xliff:g></string>
|
||||
</resources>
|
||||
14
feature/account/oauth/src/main/res/values-ca/strings.xml
Normal file
14
feature/account/oauth/src/main/res/values-ca/strings.xml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<string name="account_oauth_sign_in_with_google_button">Iniciar sessió amb Google</string>
|
||||
<string name="account_oauth_loading_error">Ha fallat l\'inici de sessió amb OAuth</string>
|
||||
<string name="account_oauth_error_failed">L\'autorització ha fallat amb l\'error següent: <xliff:g id="error">%s</xliff:g></string>
|
||||
<string name="account_oauth_error_browser_not_available">L\'aplicació no ha pogut trobar un navegador per a concedir accés al vostre compte.</string>
|
||||
<string name="account_oauth_error_not_supported">Actualment, OAuth 2.0 no és compatible amb aquest proveïdor.</string>
|
||||
<string name="account_oauth_error_canceled">Autorització cancel·lada</string>
|
||||
<string name="account_oauth_loading_message">Iniciar sessió utilitzant OAuth</string>
|
||||
<string name="account_oauth_sign_in_description">Us redigirem al seu proveïdor de correu per a iniciar la sessió. Heu de concedir accés a l\'aplicació per a poder accedir a les dades.</string>
|
||||
<string name="account_oauth_sign_in_button">Iniciar sessió</string>
|
||||
<string name="account_oauth_google_sign_in_support_text">Si experimentes problemes iniciant sessió amb Google, consulta el nostre {placeHolder}.</string>
|
||||
<string name="account_oauth_google_sign_in_support_text_link_text">article de suport</string>
|
||||
</resources>
|
||||
14
feature/account/oauth/src/main/res/values-co/strings.xml
Normal file
14
feature/account/oauth/src/main/res/values-co/strings.xml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<string name="account_oauth_error_failed">Fiascu di l’autorizazione cù quellu sbagliu : <xliff:g id="error">%s</xliff:g></string>
|
||||
<string name="account_oauth_sign_in_description">Avemu da ridiregevi versu u vostru furnidore di messaghjeria per cunnettesi. Ci vole à cuncede à l’appiecazione l’accessu à u vostru contu di messaghjeria.</string>
|
||||
<string name="account_oauth_sign_in_button">Cunnettesi</string>
|
||||
<string name="account_oauth_sign_in_with_google_button">Cunnettesi cù Google</string>
|
||||
<string name="account_oauth_loading_message">Cunnessione impieghendu OAuth</string>
|
||||
<string name="account_oauth_loading_error">Fiascu di a cunnessione OAuth</string>
|
||||
<string name="account_oauth_error_canceled">Autorizazione abbandunata</string>
|
||||
<string name="account_oauth_error_not_supported">Attualmente, OAuth 2.0 ùn hè micca accettatu cù stu furnidore.</string>
|
||||
<string name="account_oauth_error_browser_not_available">L’appiecazione ùn pò micca truvà un navigatore à impiegà per cuncede l’accessu à u vostru contu.</string>
|
||||
<string name="account_oauth_google_sign_in_support_text">S’è vo scuntrate prublemi durante a cunnessione à Google, fighjate puru u nostru {placeHolder}.</string>
|
||||
<string name="account_oauth_google_sign_in_support_text_link_text">articulu d’assistenza</string>
|
||||
</resources>
|
||||
14
feature/account/oauth/src/main/res/values-cs/strings.xml
Normal file
14
feature/account/oauth/src/main/res/values-cs/strings.xml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<string name="account_oauth_sign_in_with_google_button">Přihlásit se prostřednictvím Google</string>
|
||||
<string name="account_oauth_loading_error">Přihlášení pomocí OAuth se nezdařilo</string>
|
||||
<string name="account_oauth_error_failed">Ověření se nezdařilo s následující chybou: <xliff:g id="error">%s</xliff:g></string>
|
||||
<string name="account_oauth_error_browser_not_available">Nepodařilo se najít webový prohlížeč pro udělení přístupu k vašemu účtu.</string>
|
||||
<string name="account_oauth_error_not_supported">OAuth 2.0 není v současnosti tímto poskytovatelem podporováno.</string>
|
||||
<string name="account_oauth_error_canceled">Ověření zrušeno</string>
|
||||
<string name="account_oauth_loading_message">Přihlašování pomocí OAuth</string>
|
||||
<string name="account_oauth_sign_in_description">Pro přihlášení budete přesměrování k poskytovateli vaší e-mailové schránky. Budete muset aplikaci udělit oprávnění pro přístup ke svému e-mailovému účtu.</string>
|
||||
<string name="account_oauth_sign_in_button">Přihlásit se</string>
|
||||
<string name="account_oauth_google_sign_in_support_text_link_text">článek podpory</string>
|
||||
<string name="account_oauth_google_sign_in_support_text">Pokud máte problémy s přihlášením přes Google, podívejte se na náš {placeHolder}.</string>
|
||||
</resources>
|
||||
2
feature/account/oauth/src/main/res/values-cy/strings.xml
Normal file
2
feature/account/oauth/src/main/res/values-cy/strings.xml
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources></resources>
|
||||
7
feature/account/oauth/src/main/res/values-da/strings.xml
Normal file
7
feature/account/oauth/src/main/res/values-da/strings.xml
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="account_oauth_sign_in_with_google_button">Log ind med Google</string>
|
||||
<string name="account_oauth_loading_error">OAuth login mislykkedes</string>
|
||||
<string name="account_oauth_loading_message">Logger ind med OAuth</string>
|
||||
<string name="account_oauth_sign_in_button">Log ind</string>
|
||||
</resources>
|
||||
14
feature/account/oauth/src/main/res/values-de/strings.xml
Normal file
14
feature/account/oauth/src/main/res/values-de/strings.xml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<string name="account_oauth_sign_in_with_google_button">Mit Google anmelden</string>
|
||||
<string name="account_oauth_loading_error">Anmelden mit OAuth fehlgeschlagen</string>
|
||||
<string name="account_oauth_error_failed">Autorisierung mit folgendem Fehler fehlgeschlagen: <xliff:g id="error">%s</xliff:g></string>
|
||||
<string name="account_oauth_error_browser_not_available">Die App konnte keinen Browser finden, der für den Zugriff auf dein Konto verwendet werden kann.</string>
|
||||
<string name="account_oauth_error_not_supported">OAuth 2.0 wird von diesem Anbieter derzeit nicht unterstützt.</string>
|
||||
<string name="account_oauth_error_canceled">Autorisierung aufgehoben</string>
|
||||
<string name="account_oauth_loading_message">Mit OAuth anmelden</string>
|
||||
<string name="account_oauth_sign_in_description">Wir leiten dich zu deinem E-Mail-Anbieter weiter, damit du dich anmelden kannst. Du musst der App Zugriff auf dein E-Mail-Konto gewähren.</string>
|
||||
<string name="account_oauth_sign_in_button">Anmelden</string>
|
||||
<string name="account_oauth_google_sign_in_support_text_link_text">Artikel zur Unterstützung</string>
|
||||
<string name="account_oauth_google_sign_in_support_text">Bei Schwierigkeiten beim Anmelden mit Google wenden Sie sich bitte an {placeHolder}.</string>
|
||||
</resources>
|
||||
14
feature/account/oauth/src/main/res/values-el/strings.xml
Normal file
14
feature/account/oauth/src/main/res/values-el/strings.xml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<string name="account_oauth_sign_in_with_google_button">Σύνδεση με Google</string>
|
||||
<string name="account_oauth_loading_error">Η σύνδεση με OAuth απέτυχε</string>
|
||||
<string name="account_oauth_error_failed">Η εξουσιοδότηση απέτυχε με το ακόλουθο σφάλμα: <xliff:g id="error">%s</xliff:g></string>
|
||||
<string name="account_oauth_error_browser_not_available">Η εφαρμογή δεν μπόρεσε να εντοπίσει κάποιο πρόγραμμα περιήγησης για την παραχώρηση πρόσβασης στον λογαριασμό σας.</string>
|
||||
<string name="account_oauth_error_not_supported">Το OAuth 2.0 δεν υποστηρίζεται προς το παρόν από αυτόν τον πάροχο.</string>
|
||||
<string name="account_oauth_error_canceled">Η εξουσιοδότηση ακυρώθηκε</string>
|
||||
<string name="account_oauth_loading_message">Σύνδεση με χρήση OAuth</string>
|
||||
<string name="account_oauth_sign_in_description">Θα σας ανακατευθύνουμε στον πάροχο ηλεκτρονικού ταχυδρομείου σας για να κάνετε σύνδεση. Θα πρέπει να παραχωρήσετε στην εφαρμογή πρόσβαση στον λογαριασμό email σας.</string>
|
||||
<string name="account_oauth_sign_in_button">Σύνδεση</string>
|
||||
<string name="account_oauth_google_sign_in_support_text">Αν αντιμετωπίζετε προβλήματα κατά τη σύνδεση με την Google, συμβουλευτείτε το {placeHolder}.</string>
|
||||
<string name="account_oauth_google_sign_in_support_text_link_text">άρθρο υποστήριξης</string>
|
||||
</resources>
|
||||
14
feature/account/oauth/src/main/res/values-en-rGB/strings.xml
Normal file
14
feature/account/oauth/src/main/res/values-en-rGB/strings.xml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<string name="account_oauth_sign_in_with_google_button">Sign in with Google</string>
|
||||
<string name="account_oauth_loading_error">OAuth sign in failed</string>
|
||||
<string name="account_oauth_error_failed">Authorisation failed with the following error: <xliff:g id="error">%s</xliff:g></string>
|
||||
<string name="account_oauth_error_browser_not_available">The app couldn\'t find a browser to use for granting access to your account.</string>
|
||||
<string name="account_oauth_error_not_supported">OAuth 2.0 is currently not supported with this provider.</string>
|
||||
<string name="account_oauth_error_canceled">Authorisation cancelled</string>
|
||||
<string name="account_oauth_loading_message">Signing in using OAuth</string>
|
||||
<string name="account_oauth_sign_in_description">We\'ll redirect you to your email provider to sign in. You need to grant the app access to your email account.</string>
|
||||
<string name="account_oauth_sign_in_button">Sign in</string>
|
||||
<string name="account_oauth_google_sign_in_support_text">If you\'re experiencing problems when signing in with Google, please consult our {placeHolder}.</string>
|
||||
<string name="account_oauth_google_sign_in_support_text_link_text">support article</string>
|
||||
</resources>
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources></resources>
|
||||
14
feature/account/oauth/src/main/res/values-eo/strings.xml
Normal file
14
feature/account/oauth/src/main/res/values-eo/strings.xml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<string name="account_oauth_sign_in_button">Saluti</string>
|
||||
<string name="account_oauth_sign_in_with_google_button">Saluti per Google</string>
|
||||
<string name="account_oauth_loading_message">Saluti per OAuth</string>
|
||||
<string name="account_oauth_loading_error">Malsukcesis saluti per OAuth</string>
|
||||
<string name="account_oauth_error_failed">Saluto malsukcesis pro la jena eraro: <xliff:g id="error">%s</xliff:g></string>
|
||||
<string name="account_oauth_error_not_supported">OAuth 2.0 estas nun ne subtenata kun tiu provizanto.</string>
|
||||
<string name="account_oauth_error_canceled">Saluto nuligita</string>
|
||||
<string name="account_oauth_google_sign_in_support_text">Se vi spertas problemoj dum ensalutado per Google, bonvolu konsulti nia {placeHolder}.</string>
|
||||
<string name="account_oauth_google_sign_in_support_text_link_text">helpoartikolon</string>
|
||||
<string name="account_oauth_sign_in_description">Ni alidirektos vin al via retpoŝtlivero por ensaluti. Vi bezonas permesi al la apo alireblon al via retpoŝtkonto.</string>
|
||||
<string name="account_oauth_error_browser_not_available">La apo ne povis trovi retumilon por permesi alireblon al via konto.</string>
|
||||
</resources>
|
||||
14
feature/account/oauth/src/main/res/values-es/strings.xml
Normal file
14
feature/account/oauth/src/main/res/values-es/strings.xml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<string name="account_oauth_sign_in_with_google_button">Iniciar sesión con Google</string>
|
||||
<string name="account_oauth_loading_error">El inicio de sesión mediante OAuth ha fallado</string>
|
||||
<string name="account_oauth_error_failed">La autorización ha fallado con el siguiente error: <xliff:g id="error">%s</xliff:g></string>
|
||||
<string name="account_oauth_error_browser_not_available">La aplicación no ha encontrado ningún navegador con el que abrir una interfaz para dar acceso a tu cuenta.</string>
|
||||
<string name="account_oauth_error_not_supported">Este servicio no parece que sea compatible con OAuth 2.0 para el inicio de sesión.</string>
|
||||
<string name="account_oauth_error_canceled">Se ha abandonado la autorización</string>
|
||||
<string name="account_oauth_loading_message">Iniciar sesión mediante OAuth</string>
|
||||
<string name="account_oauth_sign_in_description">Te redirigiremos a la web de tu proveedor de correo para que escribas tus credenciales. Tienes que dar acceso a la aplicación para poder acceder a tus datos.</string>
|
||||
<string name="account_oauth_sign_in_button">Iniciar sesión</string>
|
||||
<string name="account_oauth_google_sign_in_support_text_link_text">artículo de soporte</string>
|
||||
<string name="account_oauth_google_sign_in_support_text">Si estás experimentando problemas iniciando sesión con Google, consulta nuestro {placeHolder}.</string>
|
||||
</resources>
|
||||
14
feature/account/oauth/src/main/res/values-et/strings.xml
Normal file
14
feature/account/oauth/src/main/res/values-et/strings.xml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<string name="account_oauth_sign_in_with_google_button">Logi sisse kasutades Google\'i teenuseid</string>
|
||||
<string name="account_oauth_loading_error">OAuth\'i põhine sisselogimine ei õnnestunud</string>
|
||||
<string name="account_oauth_error_failed">Autentimine ei õnnestunud ja tekkis järgnev viga: <xliff:g id="error">%s</xliff:g></string>
|
||||
<string name="account_oauth_error_browser_not_available">Rakendus ei suutnud tuvastada veebibrauserit, mida saaks sinu kontole ligipääsu lubamiseks kasutada.</string>
|
||||
<string name="account_oauth_error_not_supported">See teenusepakkuja ei võimalda OAuth 2.0 kasutamist.</string>
|
||||
<string name="account_oauth_error_canceled">Autentimine on katkestatud</string>
|
||||
<string name="account_oauth_loading_message">Logi sisse kasutades OAuth\'i</string>
|
||||
<string name="account_oauth_sign_in_description">Me suuname nüüd sind sisselogimisele sinu e-postiteenusepakkuja juurde. Seal pead sa lubama meie rakendusele ligipääsu sinu e-posti kontole.</string>
|
||||
<string name="account_oauth_sign_in_button">Logi sisse</string>
|
||||
<string name="account_oauth_google_sign_in_support_text">Kui sul tekib vigu Google\'i kontoga sisselogimisel, siis lisateavet {placeHolder}.</string>
|
||||
<string name="account_oauth_google_sign_in_support_text_link_text">leiad meie kasutajatoe artiklist</string>
|
||||
</resources>
|
||||
13
feature/account/oauth/src/main/res/values-eu/strings.xml
Normal file
13
feature/account/oauth/src/main/res/values-eu/strings.xml
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<string name="account_oauth_sign_in_with_google_button">Googlerekin saioa hasi</string>
|
||||
<string name="account_oauth_loading_error">Akatsa OAuth bidez saioa hasterakoan</string>
|
||||
<string name="account_oauth_error_failed">Baimentzerakoan akatsa honako errorearekin: <xliff:g id="error">%s</xliff:g></string>
|
||||
<string name="account_oauth_error_browser_not_available">Aplikazioak ezin izan du aurkitu zure kontura sartzeko erabili beharreko nabigatzailerik.</string>
|
||||
<string name="account_oauth_error_not_supported">OAuth 2.0 ez du onartzen hornitzaile honek.</string>
|
||||
<string name="account_oauth_error_canceled">Baimentzea ezeztatuta</string>
|
||||
<string name="account_oauth_loading_message">Saioa hasi OAuth erabiliaz</string>
|
||||
<string name="account_oauth_sign_in_description">Posta elektronikoaren hornitzailearenera bidaliko zaitugu saioa hasteko. Aplikazioari sarbidea baimendu behar diozu zure e-mail kontuan.</string>
|
||||
<string name="account_oauth_sign_in_button">Saioa hasi</string>
|
||||
<string name="account_oauth_google_sign_in_support_text_link_text">laguntza artikulua</string>
|
||||
</resources>
|
||||
14
feature/account/oauth/src/main/res/values-fa/strings.xml
Normal file
14
feature/account/oauth/src/main/res/values-fa/strings.xml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<string name="account_oauth_sign_in_with_google_button">ورود با حساب گوگل</string>
|
||||
<string name="account_oauth_loading_error">خطا در ورود با OAuth</string>
|
||||
<string name="account_oauth_error_failed">مجوزدهی به علت این خطا ناتمام ماند: <xliff:g id="error">%s</xliff:g></string>
|
||||
<string name="account_oauth_error_browser_not_available">مرورگری یافت نشد.</string>
|
||||
<string name="account_oauth_error_not_supported">OAuth 2.0 توسط این ارایه دهنده پشتیبانی نمیشود.</string>
|
||||
<string name="account_oauth_error_canceled">مجوزدهی لغو شد</string>
|
||||
<string name="account_oauth_loading_message">ورود با استفاده از OAuth</string>
|
||||
<string name="account_oauth_sign_in_description">برای ورود بهفراهمکنندهٔ رایانامهتان هدایتتان میکنیم. باید دسترسی حساب رایانامهتان را به برنامه بدهید.</string>
|
||||
<string name="account_oauth_sign_in_button">ثبت نام</string>
|
||||
<string name="account_oauth_google_sign_in_support_text">اگر هنگام ورود به سیستم با Google با مشکل مواجه شدید، لطفاً با {placeHolder} ما مشورت کنید.</string>
|
||||
<string name="account_oauth_google_sign_in_support_text_link_text">بند پشتیبانی</string>
|
||||
</resources>
|
||||
14
feature/account/oauth/src/main/res/values-fi/strings.xml
Normal file
14
feature/account/oauth/src/main/res/values-fi/strings.xml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<string name="account_oauth_sign_in_with_google_button">Kirjaudu Googlella</string>
|
||||
<string name="account_oauth_loading_error">OAuth-kirjautuminen epäonnistui</string>
|
||||
<string name="account_oauth_error_failed">Valtuutus epäonnistui seuraavalla virheellä: <xliff:g id="error">%s</xliff:g></string>
|
||||
<string name="account_oauth_error_browser_not_available">Sovellus ei löytänyt selainta käytettäväksi pääsyn antamiseksi tilille.</string>
|
||||
<string name="account_oauth_error_not_supported">OAuth 2.0 ei ole tällä hetkellä tuettu tämän palveluntarjoajan kanssa.</string>
|
||||
<string name="account_oauth_error_canceled">Valtuutus peruttiin</string>
|
||||
<string name="account_oauth_loading_message">Kirjaudu OAuthilla</string>
|
||||
<string name="account_oauth_sign_in_description">Ohjaamme sinut sähköpostin palveluntarjoajasi puoleen kirjautumista varten. Valtuuta sovelluksen pääsy sähköpostitilillesi.</string>
|
||||
<string name="account_oauth_sign_in_button">Kirjaudu sisään</string>
|
||||
<string name="account_oauth_google_sign_in_support_text">Jos sinulla on ongelmia Google-tilillä sisäänkirjautumisessa, tutustu {placeHolder}:imme.</string>
|
||||
<string name="account_oauth_google_sign_in_support_text_link_text">tukiartikkeli</string>
|
||||
</resources>
|
||||
14
feature/account/oauth/src/main/res/values-fr/strings.xml
Normal file
14
feature/account/oauth/src/main/res/values-fr/strings.xml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<string name="account_oauth_sign_in_with_google_button">Me connecter avec Google</string>
|
||||
<string name="account_oauth_loading_error">Échec de connexion OAuth</string>
|
||||
<string name="account_oauth_error_failed">Échec d’autorisation avec l’erreur suivante : <xliff:g id="error">%s</xliff:g></string>
|
||||
<string name="account_oauth_error_browser_not_available">L’appli n’a pas trouvé de navigateur pour accorder l’accès à votre compte.</string>
|
||||
<string name="account_oauth_error_not_supported">OAuth n\'est actuellement pas pris en charge par ce fournisseur.</string>
|
||||
<string name="account_oauth_error_canceled">L\'autorisation a été annulée</string>
|
||||
<string name="account_oauth_loading_message">Me connecter avec OAuth</string>
|
||||
<string name="account_oauth_sign_in_description">Nous vous redirigerons vers votre fournisseur de courriel pour vous connecter. Vous devez accorder à l’appli l’accès à votre compte de courriel.</string>
|
||||
<string name="account_oauth_sign_in_button">Me connecter</string>
|
||||
<string name="account_oauth_google_sign_in_support_text_link_text">article d’assistance</string>
|
||||
<string name="account_oauth_google_sign_in_support_text">Si vous rencontrez des problèmes lors de la connexion avec Google, consultez notre {placeHolder}.</string>
|
||||
</resources>
|
||||
14
feature/account/oauth/src/main/res/values-fy/strings.xml
Normal file
14
feature/account/oauth/src/main/res/values-fy/strings.xml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<string name="account_oauth_sign_in_with_google_button">Oanmelde mei Google</string>
|
||||
<string name="account_oauth_loading_error">Oanmelde mei OAuth mislearre</string>
|
||||
<string name="account_oauth_error_failed">Autorisaasje is mislearre mei de folgjende flatermelding: <xliff:g id="error">%s</xliff:g></string>
|
||||
<string name="account_oauth_error_browser_not_available">De app kin gjin browser fine. In browser is nedich om tagong te krijen ta jo account.</string>
|
||||
<string name="account_oauth_error_not_supported">OAuth 2.0 wurdt op dit stuit net stipe troch dizze provider.</string>
|
||||
<string name="account_oauth_error_canceled">Autorisaasje is annulearre</string>
|
||||
<string name="account_oauth_loading_message">Oanmelde mei OAuth</string>
|
||||
<string name="account_oauth_sign_in_description">Wy stjoere jo troch nei jo e-mailprovider om oan te melden. Jo moatte de app tagong jaan ta jo e-mailaccount.</string>
|
||||
<string name="account_oauth_sign_in_button">Oanmelde</string>
|
||||
<string name="account_oauth_google_sign_in_support_text">As jo problemen hawwe mei oanmelden by Google, lês dan ús {placeHolder}.</string>
|
||||
<string name="account_oauth_google_sign_in_support_text_link_text">stipe-artikel</string>
|
||||
</resources>
|
||||
14
feature/account/oauth/src/main/res/values-ga/strings.xml
Normal file
14
feature/account/oauth/src/main/res/values-ga/strings.xml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<string name="account_oauth_sign_in_description">Déanfaimid tú a atreorú chuig do sholáthraí ríomhphoist chun síniú isteach. Ní mór duit rochtain a thabhairt don aip ar do chuntas ríomhphoist.</string>
|
||||
<string name="account_oauth_error_canceled">Cealaíodh an t-údarú</string>
|
||||
<string name="account_oauth_error_browser_not_available">Níorbh fhéidir leis an aip brabhsálaí a aimsiú le húsáid chun rochtain a dheonú ar do chuntas.</string>
|
||||
<string name="account_oauth_loading_message">Ag síniú isteach le OAuth</string>
|
||||
<string name="account_oauth_sign_in_button">Sínigh isteach</string>
|
||||
<string name="account_oauth_sign_in_with_google_button">Sínigh isteach le Google</string>
|
||||
<string name="account_oauth_loading_error">Theip ar shíniú isteach OAuth</string>
|
||||
<string name="account_oauth_error_failed">Theip ar údarú leis an earráid seo a leanas: <xliff:g id="error"> %s</xliff:g></string>
|
||||
<string name="account_oauth_error_not_supported">Ní thacaítear le OAuth 2.0 leis an soláthraí seo faoi láthair.</string>
|
||||
<string name="account_oauth_google_sign_in_support_text_link_text">alt tacaíochta</string>
|
||||
<string name="account_oauth_google_sign_in_support_text">Má tá fadhbanna agat agus tú ag síniú isteach le Google, téigh i gcomhairle lenár {placeHolder}.</string>
|
||||
</resources>
|
||||
14
feature/account/oauth/src/main/res/values-gd/strings.xml
Normal file
14
feature/account/oauth/src/main/res/values-gd/strings.xml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<string name="account_oauth_error_browser_not_available">Cha d’fhuair an aplacaid lorg air brabhsair sam bith a chleachadh e airson cead-inntrigidh dhan chunntas agad a thoirt seachad.</string>
|
||||
<string name="account_oauth_error_not_supported">Chan eil an solaraiche seo a’ cur taic ri OAuth 2.0 aig an àm seo.</string>
|
||||
<string name="account_oauth_google_sign_in_support_text">Ma tha duilgheadasan agad le bhith a’ clàradh a-steach le Google, thoir sùil air an {placeHolder} againn.</string>
|
||||
<string name="account_oauth_google_sign_in_support_text_link_text">artaigeal taice</string>
|
||||
<string name="account_oauth_sign_in_description">Ath-stiùirichidh sinn gu solaraiche a’ phuist-d agad airson clàradh a-steach. Feumaidh tu cead-inntrigidh do chunntas a’ phuist-d agad a thoirt dhan aplacaid.</string>
|
||||
<string name="account_oauth_sign_in_button">Clàraich a-steach</string>
|
||||
<string name="account_oauth_sign_in_with_google_button">Clàraich a-steach le Google</string>
|
||||
<string name="account_oauth_loading_message">Gad chlàradh a-steach le OAuth</string>
|
||||
<string name="account_oauth_loading_error">Dh’fhàillig an clàradh a-steach le OAuth</string>
|
||||
<string name="account_oauth_error_canceled">Sguireadh dhen ùghdarrachadh</string>
|
||||
<string name="account_oauth_error_failed">Dh’fhàillig an t-ùghdarrachadh leis a’ mhearachd a leanas: <xliff:g id="error">%s</xliff:g></string>
|
||||
</resources>
|
||||
2
feature/account/oauth/src/main/res/values-gl/strings.xml
Normal file
2
feature/account/oauth/src/main/res/values-gl/strings.xml
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources></resources>
|
||||
2
feature/account/oauth/src/main/res/values-gu/strings.xml
Normal file
2
feature/account/oauth/src/main/res/values-gu/strings.xml
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources></resources>
|
||||
12
feature/account/oauth/src/main/res/values-hi/strings.xml
Normal file
12
feature/account/oauth/src/main/res/values-hi/strings.xml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<string name="account_oauth_sign_in_with_google_button">गूगल से साइनइन करें</string>
|
||||
<string name="account_oauth_loading_error">ओऑथ साइनइन फेल</string>
|
||||
<string name="account_oauth_error_failed">ऑथराइज़ेशन इस गड़बड़ के वजह से फेल हुआ: <xliff:g id="error">%s</xliff:g></string>
|
||||
<string name="account_oauth_error_browser_not_available">आपके अकाउंट का ऐक्सेस लेने के लिए ऐप को ब्राउज़र नहीं मिला।</string>
|
||||
<string name="account_oauth_error_not_supported">ये प्रोवाइडर अभी ओऑथ 2.0 सपोर्ट नहीं करता।</string>
|
||||
<string name="account_oauth_error_canceled">ऑथराइज़ेशन कैंसिल किया गया</string>
|
||||
<string name="account_oauth_loading_message">ओऑथ से साइनइन कर रहे</string>
|
||||
<string name="account_oauth_sign_in_description">हम आपको साइनइन करने के लिए आपके ईमेल प्रोवाइडर पे रीडायरेक्ट करेंगे। आपको ऐप को अपने ईमेल अकाउंट का ऐक्सेस देना होगा।</string>
|
||||
<string name="account_oauth_sign_in_button">साइनइन करें</string>
|
||||
</resources>
|
||||
12
feature/account/oauth/src/main/res/values-hr/strings.xml
Normal file
12
feature/account/oauth/src/main/res/values-hr/strings.xml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<string name="account_oauth_sign_in_description">Preusmjerit ćemo Vas vašem davatelju usluga e-pošte da se prijavite. Morate aplikaciji odobriti pristup vašem računu e-pošte.</string>
|
||||
<string name="account_oauth_sign_in_button">Prijavite se</string>
|
||||
<string name="account_oauth_sign_in_with_google_button">Prijavite se s Googleom</string>
|
||||
<string name="account_oauth_loading_message">Prijavite se koristeći OAuth</string>
|
||||
<string name="account_oauth_loading_error">OAuth prijava nije uspjela</string>
|
||||
<string name="account_oauth_error_canceled">Autorizacija poništena</string>
|
||||
<string name="account_oauth_error_not_supported">OAuth 2.0 trenutačno nije podržan kod ovog pružatelja usluga e-pošte.</string>
|
||||
<string name="account_oauth_error_browser_not_available">Aplikacija nije mogla pronaći preglednik za davanje pristupa vašem računu.</string>
|
||||
<string name="account_oauth_error_failed">Autorizacija nije uspjela sa sljedećom pogreškom: <xliff:g id="error">%s</xliff:g></string>
|
||||
</resources>
|
||||
14
feature/account/oauth/src/main/res/values-hu/strings.xml
Normal file
14
feature/account/oauth/src/main/res/values-hu/strings.xml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<string name="account_oauth_sign_in_with_google_button">Bejelentkezés Google használatával</string>
|
||||
<string name="account_oauth_loading_error">Az OAuth bejelentkezés sikertelen volt.</string>
|
||||
<string name="account_oauth_error_failed">A hitelesítés sikertelen volt a következő hiba miatt: <xliff:g id="error">%s</xliff:g></string>
|
||||
<string name="account_oauth_error_browser_not_available">Az alkalmazás nem talált böngészőt, amellyel hozzáférést biztosíthatna fiókhoz.</string>
|
||||
<string name="account_oauth_error_not_supported">Az OAuth 2.0 jelenleg nem támogatott ennél a szolgáltatónál.</string>
|
||||
<string name="account_oauth_error_canceled">A hitelesítés megszakításra került</string>
|
||||
<string name="account_oauth_loading_message">Bejelentkezés OAuth használatával</string>
|
||||
<string name="account_oauth_sign_in_description">A bejelentkezéshez átirányítjuk az e-mail-szolgáltatóhoz. Meg kell adni az alkalmazásnak a hozzáférést az e-mail-fiókhoz.</string>
|
||||
<string name="account_oauth_sign_in_button">Bejelentkezés</string>
|
||||
<string name="account_oauth_google_sign_in_support_text">Ha problémákat tapasztal a Google-lel történő bejelentkezéssel, tekintse meg a {placeHolder}.</string>
|
||||
<string name="account_oauth_google_sign_in_support_text_link_text">támogatási leírásunkat</string>
|
||||
</resources>
|
||||
2
feature/account/oauth/src/main/res/values-hy/strings.xml
Normal file
2
feature/account/oauth/src/main/res/values-hy/strings.xml
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources></resources>
|
||||
14
feature/account/oauth/src/main/res/values-in/strings.xml
Normal file
14
feature/account/oauth/src/main/res/values-in/strings.xml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<string name="account_oauth_sign_in_description">Kami akan mengarahkan Anda ke penyedia surel untuk masuk ke akun Anda. Namun, izinkan akses aplikasi ke akun surel Anda terlebih dahulu.</string>
|
||||
<string name="account_oauth_sign_in_button">Masuk</string>
|
||||
<string name="account_oauth_sign_in_with_google_button">Masuk dengan Google</string>
|
||||
<string name="account_oauth_loading_message">Masuk dengan OAuth</string>
|
||||
<string name="account_oauth_loading_error">Gagal masuk dengan OAuth</string>
|
||||
<string name="account_oauth_error_canceled">Otorisasi dibatalkan</string>
|
||||
<string name="account_oauth_error_failed">Otorisasi gagal akibat galat berikut: <xliff:g id="error">%s</xliff:g></string>
|
||||
<string name="account_oauth_error_not_supported">OAuth 2.0 saat ini tidak didukung oleh penyedia ini.</string>
|
||||
<string name="account_oauth_error_browser_not_available">Aplikasi ini tidak menemukan peramban yang bisa digunakan untuk memberikan akses ke akun Anda.</string>
|
||||
<string name="account_oauth_google_sign_in_support_text_link_text">bantuan</string>
|
||||
<string name="account_oauth_google_sign_in_support_text">Jika Anda mengalami masalah saat masuk dengan Google, silakan baca {placeHolder}.</string>
|
||||
</resources>
|
||||
14
feature/account/oauth/src/main/res/values-is/strings.xml
Normal file
14
feature/account/oauth/src/main/res/values-is/strings.xml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<string name="account_oauth_sign_in_with_google_button">Skrá inn með Google</string>
|
||||
<string name="account_oauth_loading_error">Innskráning með OAuth mistókst</string>
|
||||
<string name="account_oauth_error_failed">Auðkenning mistókst með eftirfarandi villuboðum: <xliff:g id="error">%s</xliff:g></string>
|
||||
<string name="account_oauth_error_browser_not_available">Forritið fann engan vafra til að nota til að fá aðgang að notandaaðgangnum þínum.</string>
|
||||
<string name="account_oauth_error_not_supported">OAuth 2.0 er ekki stutt í augnablikinu hjá þessari þjónustuveitu.</string>
|
||||
<string name="account_oauth_error_canceled">Hætt við auðkenningu</string>
|
||||
<string name="account_oauth_loading_message">Skrái inn með OAuth</string>
|
||||
<string name="account_oauth_sign_in_description">Við munum endurbeina þér til póstþjónustunnar þinnar til að skrá þig inn. Þú þarft að veita forritinu aðgang að tölvupóstreikningnum þínum.</string>
|
||||
<string name="account_oauth_sign_in_button">Skrá inn</string>
|
||||
<string name="account_oauth_google_sign_in_support_text">Ef þú átt í vandræðum með að skrá inn með Google ættirðu að skoða {placeHolder} hjá okkur.</string>
|
||||
<string name="account_oauth_google_sign_in_support_text_link_text">leiðbeiningarnar</string>
|
||||
</resources>
|
||||
14
feature/account/oauth/src/main/res/values-it/strings.xml
Normal file
14
feature/account/oauth/src/main/res/values-it/strings.xml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<string name="account_oauth_sign_in_with_google_button">Accedi con Google</string>
|
||||
<string name="account_oauth_loading_error">Accesso OAuth non riuscito</string>
|
||||
<string name="account_oauth_error_failed">Autorizzazione non riuscita con il seguente errore: <xliff:g id="error">%s</xliff:g></string>
|
||||
<string name="account_oauth_error_browser_not_available">L\'app non è riuscita a trovare un browser per concedere l\'accesso al tuo account</string>
|
||||
<string name="account_oauth_error_not_supported">OAuth 2.0 non è supportato con questo provider</string>
|
||||
<string name="account_oauth_error_canceled">Autorizzazione annullata</string>
|
||||
<string name="account_oauth_loading_message">Accedi tramite OAuth</string>
|
||||
<string name="account_oauth_sign_in_description">Sarai reindirizzato al tuo provider di posta elettronica per accedere. Autorizza l\'app ad accedere al tuo account di posta elettronica.</string>
|
||||
<string name="account_oauth_sign_in_button">Accedi</string>
|
||||
<string name="account_oauth_google_sign_in_support_text_link_text">Articolo di supporto</string>
|
||||
<string name="account_oauth_google_sign_in_support_text">Se riscontri problemi durante l\'accesso con Google, consulta il nostro {placeHolder}.</string>
|
||||
</resources>
|
||||
14
feature/account/oauth/src/main/res/values-iw/strings.xml
Normal file
14
feature/account/oauth/src/main/res/values-iw/strings.xml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<string name="account_oauth_sign_in_description">אנו נפנה אותך אל ספק הדוא\"ל שלך כדי להיכנס. עליך להעניק לאפליקציה גישה לחשבון הדוא\"ל שלך.</string>
|
||||
<string name="account_oauth_sign_in_button">התחבר</string>
|
||||
<string name="account_oauth_sign_in_with_google_button">התחבר עם Google</string>
|
||||
<string name="account_oauth_loading_message">כניסה באמצעות OAuth</string>
|
||||
<string name="account_oauth_loading_error">כניסה באמצעות OAuth נכשלה</string>
|
||||
<string name="account_oauth_error_not_supported">OAuth 2.0 כרגע לא נתמך עם הספק הזה.</string>
|
||||
<string name="account_oauth_error_browser_not_available">היישומון לא הצליח למצוא דפדפן להשתמש בו כדי לתת גישה לחשבון שלך.</string>
|
||||
<string name="account_oauth_error_canceled">הרשאה בוטלה</string>
|
||||
<string name="account_oauth_error_failed">הרשאה נכשלה עם השגיאה שלהלן: <xliff:g id="error">%s</xliff:g></string>
|
||||
<string name="account_oauth_google_sign_in_support_text_link_text">מאמר תמיכה</string>
|
||||
<string name="account_oauth_google_sign_in_support_text">אם אתה נתקל בבעיות בעת הכניסה ל-Google, פנה אל {placeHolder} שלנו.</string>
|
||||
</resources>
|
||||
14
feature/account/oauth/src/main/res/values-ja/strings.xml
Normal file
14
feature/account/oauth/src/main/res/values-ja/strings.xml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<string name="account_oauth_sign_in_with_google_button">Google でログイン</string>
|
||||
<string name="account_oauth_loading_error">OAuth ログインに失敗しました</string>
|
||||
<string name="account_oauth_error_failed">以下のエラーにより認証に失敗しました: <xliff:g id="error">%s</xliff:g></string>
|
||||
<string name="account_oauth_error_browser_not_available">アカウントへのアクセス権付与に必要なブラウザーアプリが見つかりませんでした。</string>
|
||||
<string name="account_oauth_error_not_supported">現在、このプロバイダーは OAuth 2.0 に対応していません。</string>
|
||||
<string name="account_oauth_error_canceled">認証がキャンセルされました</string>
|
||||
<string name="account_oauth_loading_message">OAuth でログイン中</string>
|
||||
<string name="account_oauth_sign_in_description">ログインのため、あなたのメールプロバイダーにリダイレクトします。アプリにメールアカウントへのアクセス権を付与してください。</string>
|
||||
<string name="account_oauth_sign_in_button">ログイン</string>
|
||||
<string name="account_oauth_google_sign_in_support_text_link_text">サポート記事</string>
|
||||
<string name="account_oauth_google_sign_in_support_text">Google でログインに問題がある場合は、{placeHolder}を確認してください。</string>
|
||||
</resources>
|
||||
2
feature/account/oauth/src/main/res/values-ka/strings.xml
Normal file
2
feature/account/oauth/src/main/res/values-ka/strings.xml
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources></resources>
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources></resources>
|
||||
6
feature/account/oauth/src/main/res/values-kk/strings.xml
Normal file
6
feature/account/oauth/src/main/res/values-kk/strings.xml
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="account_oauth_sign_in_button">Кіру</string>
|
||||
<string name="account_oauth_sign_in_with_google_button">Google арқылы кіру</string>
|
||||
<string name="account_oauth_loading_message">OAuth арқылы кіруде</string>
|
||||
</resources>
|
||||
12
feature/account/oauth/src/main/res/values-ko/strings.xml
Normal file
12
feature/account/oauth/src/main/res/values-ko/strings.xml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<string name="account_oauth_sign_in_button">로그인</string>
|
||||
<string name="account_oauth_sign_in_with_google_button">구글로 로그인하기</string>
|
||||
<string name="account_oauth_loading_message">OAuth로 로그인</string>
|
||||
<string name="account_oauth_loading_error">OAuth 로그인 실패</string>
|
||||
<string name="account_oauth_error_canceled">인증 취소됨</string>
|
||||
<string name="account_oauth_error_failed">다음 오류로 인증에 실패했습니다: <xliff:g id="error">%s</xliff:g></string>
|
||||
<string name="account_oauth_error_browser_not_available">계정에 대한 액세스 권한을 부여하는 데 사용할 브라우저를 찾을 수 없습니다.</string>
|
||||
<string name="account_oauth_error_not_supported">현재 이 제공자에서는 OAuth 2.0이 지원되지 않습니다.</string>
|
||||
<string name="account_oauth_sign_in_description">로그인을 위해 이메일 제공업체로 리디렉션됩니다. 이메일 계정에 대한 접근 권한이 필요합니다.</string>
|
||||
</resources>
|
||||
12
feature/account/oauth/src/main/res/values-lt/strings.xml
Normal file
12
feature/account/oauth/src/main/res/values-lt/strings.xml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<string name="account_oauth_sign_in_description">Kad prisijungtumėte, jus nukreipsime pas jūsų el. pašto paslaugos teikėją. Šiai programai turėsite suteikti prieigą prie savo el. pašto paskyros.</string>
|
||||
<string name="account_oauth_sign_in_button">Prisijungti</string>
|
||||
<string name="account_oauth_sign_in_with_google_button">Prisijungti per „Google“</string>
|
||||
<string name="account_oauth_loading_message">Prisijungti naudojant „OAuth“</string>
|
||||
<string name="account_oauth_loading_error">Prisijungti naudojant „OAuth“ nepavyko</string>
|
||||
<string name="account_oauth_error_canceled">Tapatybės patvirtinimas nutrauktas</string>
|
||||
<string name="account_oauth_error_failed">Tapatybės patikrinimas nepavyko dėl klaidos: <xliff:g id="error">%s</xliff:g></string>
|
||||
<string name="account_oauth_error_not_supported">„OAuth 2.0“ šiuo metu su šiuo tiekėju nepalaikoma.</string>
|
||||
<string name="account_oauth_error_browser_not_available">Programai nepavyko aptikti naršyklės, kurią galėtų panaudoti prieigai prie jūsų paskyros gauti.</string>
|
||||
</resources>
|
||||
2
feature/account/oauth/src/main/res/values-lv/strings.xml
Normal file
2
feature/account/oauth/src/main/res/values-lv/strings.xml
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources></resources>
|
||||
2
feature/account/oauth/src/main/res/values-ml/strings.xml
Normal file
2
feature/account/oauth/src/main/res/values-ml/strings.xml
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources></resources>
|
||||
14
feature/account/oauth/src/main/res/values-nb-rNO/strings.xml
Normal file
14
feature/account/oauth/src/main/res/values-nb-rNO/strings.xml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<string name="account_oauth_sign_in_with_google_button">Logg inn med Google</string>
|
||||
<string name="account_oauth_loading_error">Innlogging med OAuth mislyktes</string>
|
||||
<string name="account_oauth_error_failed">Autorisering mislyktes med følgende feil: <xliff:g id="error">%s</xliff:g></string>
|
||||
<string name="account_oauth_error_browser_not_available">Appen klarte ikke å finne noen nettleser å bruke for å innvilge tilgang til kontoen din.</string>
|
||||
<string name="account_oauth_error_not_supported">OAuth 2.0 støttes ikke med denne tilbyderen.</string>
|
||||
<string name="account_oauth_error_canceled">Autorisasjon avbrutt</string>
|
||||
<string name="account_oauth_loading_message">Logger inn med OAuth</string>
|
||||
<string name="account_oauth_sign_in_description">Du vil bli sendt til din e-posttilbyder for innlogging. Du må innvilge programmet tilgang til e-postkontoen din.</string>
|
||||
<string name="account_oauth_sign_in_button">Logg inn</string>
|
||||
<string name="account_oauth_google_sign_in_support_text">Hvis du opplever problemer når du logger inn med Google, oppsøk vår {placeHolder}.</string>
|
||||
<string name="account_oauth_google_sign_in_support_text_link_text">hjelpeartikkel</string>
|
||||
</resources>
|
||||
14
feature/account/oauth/src/main/res/values-nl/strings.xml
Normal file
14
feature/account/oauth/src/main/res/values-nl/strings.xml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<string name="account_oauth_sign_in_with_google_button">Aanmelden met Google</string>
|
||||
<string name="account_oauth_loading_error">Aanmelden met OAuth mislukt</string>
|
||||
<string name="account_oauth_error_failed">Autorisatie is mislukt met de volgende foutmelding: <xliff:g id="error">%s</xliff:g></string>
|
||||
<string name="account_oauth_error_browser_not_available">De app kan geen browser vinden. Een browser is nodig om toegang tot uw account te krijgen.</string>
|
||||
<string name="account_oauth_error_not_supported">OAuth 2.0 wordt nu niet ondersteund door deze provider.</string>
|
||||
<string name="account_oauth_error_canceled">Autorisatie is geannuleerd</string>
|
||||
<string name="account_oauth_loading_message">Aanmelden met OAuth</string>
|
||||
<string name="account_oauth_sign_in_description">We sturen u door naar uw e-mailprovider om aan te melden. U moet de app toegang geven tot uw e-mailaccount.</string>
|
||||
<string name="account_oauth_sign_in_button">Aanmelden</string>
|
||||
<string name="account_oauth_google_sign_in_support_text_link_text">ondersteuningsartikel</string>
|
||||
<string name="account_oauth_google_sign_in_support_text">Als u problemen hebt met aanmelden bij Google, lees dan onze {placeHolder}.</string>
|
||||
</resources>
|
||||
14
feature/account/oauth/src/main/res/values-nn/strings.xml
Normal file
14
feature/account/oauth/src/main/res/values-nn/strings.xml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<string name="account_oauth_sign_in_button">Logg inn</string>
|
||||
<string name="account_oauth_sign_in_with_google_button">Logg in med Google</string>
|
||||
<string name="account_oauth_sign_in_description">Du vil bli sendt til e-posttilbydaren din for innlogging. Du må gje programmet tilgang til e-postkontoen din.</string>
|
||||
<string name="account_oauth_loading_message">Loggar inn med OAuth</string>
|
||||
<string name="account_oauth_loading_error">Mislykka innlogging med OAuth</string>
|
||||
<string name="account_oauth_error_canceled">Godkjenning avbroten</string>
|
||||
<string name="account_oauth_error_failed">Mislykka godkjenning med følgjande feil: <xliff:g id="error">%s</xliff:g></string>
|
||||
<string name="account_oauth_error_not_supported">OAuth 2.0 er ikkje støtta med denne tilbydaren.</string>
|
||||
<string name="account_oauth_error_browser_not_available">Appen klarte ikkje å finne nokon nettlesar å bruke for å innvilge tilgang til kontoen din.</string>
|
||||
<string name="account_oauth_google_sign_in_support_text">Om du opplever problemer med å logge inn med Google, konsulter {placeHolder}.</string>
|
||||
<string name="account_oauth_google_sign_in_support_text_link_text">artikkelen i brukarstønaden vår</string>
|
||||
</resources>
|
||||
14
feature/account/oauth/src/main/res/values-pl/strings.xml
Normal file
14
feature/account/oauth/src/main/res/values-pl/strings.xml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<string name="account_oauth_sign_in_with_google_button">Zaloguj się przez Google</string>
|
||||
<string name="account_oauth_loading_error">Logowanie OAuth nie powiodło się</string>
|
||||
<string name="account_oauth_error_failed">Autoryzacja nie powiodła się z powodu następującego błędu: <xliff:g id="error">%s</xliff:g></string>
|
||||
<string name="account_oauth_error_browser_not_available">Aplikacja nie mogła znaleźć przeglądarki, za pomocą której można uzyskać dostęp do Twojego konta.</string>
|
||||
<string name="account_oauth_error_not_supported">Ten dostawca nie obsługuje obecnie protokołu OAuth 2.0.</string>
|
||||
<string name="account_oauth_error_canceled">Autoryzacja anulowana</string>
|
||||
<string name="account_oauth_loading_message">Logowanie przy użyciu OAuth</string>
|
||||
<string name="account_oauth_sign_in_description">Przekierujemy Cię do Twojego dostawcy poczty e-mail, żebyś się zalogował. Musisz przyznać aplikacji dostęp do swojego konta e-mail.</string>
|
||||
<string name="account_oauth_sign_in_button">Zaloguj się</string>
|
||||
<string name="account_oauth_google_sign_in_support_text_link_text">artykułem pomocy</string>
|
||||
<string name="account_oauth_google_sign_in_support_text">Jeśli masz problemy z logowaniem się za pomocą konta Google, zapoznaj się z naszym {placeHolder}.</string>
|
||||
</resources>
|
||||
14
feature/account/oauth/src/main/res/values-pt-rBR/strings.xml
Normal file
14
feature/account/oauth/src/main/res/values-pt-rBR/strings.xml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<string name="account_oauth_sign_in_with_google_button">Entrar com Google</string>
|
||||
<string name="account_oauth_loading_error">Acesso com OAuth falhou</string>
|
||||
<string name="account_oauth_error_failed">Autorização falhou com o erro: <xliff:g id="error">%s</xliff:g></string>
|
||||
<string name="account_oauth_error_browser_not_available">O aplicativo não conseguiu encontrar um navegador para conceder acesso à sua conta.</string>
|
||||
<string name="account_oauth_error_not_supported">No momento não há suporte para OAuth 2.0 neste provedor.</string>
|
||||
<string name="account_oauth_error_canceled">Autorização cancelada</string>
|
||||
<string name="account_oauth_loading_message">Entrar com OAuth</string>
|
||||
<string name="account_oauth_sign_in_description">Iremos lhe redirecionar ao provedor de email para entrar na sua conta. Você precisa conceder ao aplicativo acesso à sua conta de email.</string>
|
||||
<string name="account_oauth_sign_in_button">Entrar</string>
|
||||
<string name="account_oauth_google_sign_in_support_text">Se estiver com problemas ao entrar com Google, consulte nosso {placeHolder}.</string>
|
||||
<string name="account_oauth_google_sign_in_support_text_link_text">artigo de suporte</string>
|
||||
</resources>
|
||||
14
feature/account/oauth/src/main/res/values-pt-rPT/strings.xml
Normal file
14
feature/account/oauth/src/main/res/values-pt-rPT/strings.xml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<string name="account_oauth_sign_in_with_google_button">Iniciar sessão com Google</string>
|
||||
<string name="account_oauth_loading_error">Falha ao iniciar sessão via OAuth</string>
|
||||
<string name="account_oauth_error_failed">A autorização falhou com o erro:<xliff:g id="error">%s</xliff:g></string>
|
||||
<string name="account_oauth_error_browser_not_available">A aplicação não encontrou um navegador que possa utilizar para permitir o acesso à conta.</string>
|
||||
<string name="account_oauth_error_not_supported">OAuth 2.0 não é, atualmente, suportado por este serviço.</string>
|
||||
<string name="account_oauth_error_canceled">Autorização cancelada</string>
|
||||
<string name="account_oauth_loading_message">Iniciar sessão via OAuth</string>
|
||||
<string name="account_oauth_sign_in_description">Iremos encaminhar para o seu fornecedor de e-mail para iniciar sessão. Tem de permitir à aplicação o acesso à sua conta.</string>
|
||||
<string name="account_oauth_sign_in_button">Iniciar sessão</string>
|
||||
<string name="account_oauth_google_sign_in_support_text_link_text">artigo de apoio</string>
|
||||
<string name="account_oauth_google_sign_in_support_text">Se estiver com problemas ao entrar com Google, consulte o nosso {placeHolder}.</string>
|
||||
</resources>
|
||||
2
feature/account/oauth/src/main/res/values-pt/strings.xml
Normal file
2
feature/account/oauth/src/main/res/values-pt/strings.xml
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources></resources>
|
||||
14
feature/account/oauth/src/main/res/values-ro/strings.xml
Normal file
14
feature/account/oauth/src/main/res/values-ro/strings.xml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<string name="account_oauth_sign_in_with_google_button">Conectează-te cu Google</string>
|
||||
<string name="account_oauth_loading_error">Conectarea OAuth a eșuat</string>
|
||||
<string name="account_oauth_error_failed">Autorizarea a eșuat cu următoarea eroare: <xliff:g id="error">%s</xliff:g></string>
|
||||
<string name="account_oauth_error_browser_not_available">Aplicația nu a putut găsi un browser pe care să îl folosească pentru a acorda acces la cont.</string>
|
||||
<string name="account_oauth_error_not_supported">OAuth 2.0 nu este acceptat în prezent cu acest furnizor.</string>
|
||||
<string name="account_oauth_error_canceled">Autorizație anulată</string>
|
||||
<string name="account_oauth_loading_message">Conectare folosind OAuth</string>
|
||||
<string name="account_oauth_sign_in_description">Te vom redirecționa către furnizorul de e-mail pentru a te conecta. Trebuie să acorzi aplicației acces la contul de e-mail.</string>
|
||||
<string name="account_oauth_sign_in_button">Conectează-te</string>
|
||||
<string name="account_oauth_google_sign_in_support_text">Dacă întâmpini probleme când te conectezi cu Google, consultă {placeHolder}.</string>
|
||||
<string name="account_oauth_google_sign_in_support_text_link_text">articol de suport</string>
|
||||
</resources>
|
||||
14
feature/account/oauth/src/main/res/values-ru/strings.xml
Normal file
14
feature/account/oauth/src/main/res/values-ru/strings.xml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<string name="account_oauth_error_not_supported">В настоящее время OAuth 2.0 данным провайдером не поддерживается.</string>
|
||||
<string name="account_oauth_error_browser_not_available">Не найден браузер для предоставления доступа к вашей учётной записи.</string>
|
||||
<string name="account_oauth_sign_in_button">Войти</string>
|
||||
<string name="account_oauth_sign_in_with_google_button">Войти через Google</string>
|
||||
<string name="account_oauth_loading_message">Войти через OAuth</string>
|
||||
<string name="account_oauth_loading_error">Не удалось выполнить вход по протоколу OAuth</string>
|
||||
<string name="account_oauth_error_canceled">Авторизация отменена</string>
|
||||
<string name="account_oauth_error_failed">Авторизация не выполнена из-за ошибки: <xliff:g id="error">%s</xliff:g></string>
|
||||
<string name="account_oauth_sign_in_description">Сейчас вы будете перенаправлены к вашему провайдеру электронной почты для входа в систему. Вам будет необходимо предоставить приложению доступ к вашему электронному адресу.</string>
|
||||
<string name="account_oauth_google_sign_in_support_text_link_text">статье поддержки</string>
|
||||
<string name="account_oauth_google_sign_in_support_text">Если у вас возникли проблемы при входе в учётную запись Google, обратитесь к {placeHolder}.</string>
|
||||
</resources>
|
||||
12
feature/account/oauth/src/main/res/values-sk/strings.xml
Normal file
12
feature/account/oauth/src/main/res/values-sk/strings.xml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<string name="account_oauth_sign_in_with_google_button">Prihlásiť sa cez Google</string>
|
||||
<string name="account_oauth_sign_in_description">Na prihlásenie vás presmerujeme na stránku vášho e-mailu. Budete musieť aplikácii povoliť prístup k vášmu e-mailu.</string>
|
||||
<string name="account_oauth_sign_in_button">Prihlásiť sa</string>
|
||||
<string name="account_oauth_error_browser_not_available">Aplikácia nenašla prehliadač použiteľný na udelenie prístupu k vášmu účtu.</string>
|
||||
<string name="account_oauth_error_not_supported">OAuth 2.0 nie je zatiaľ týmto poskytovateľom podporované.</string>
|
||||
<string name="account_oauth_loading_message">Prihlasovanie pomocou OAuth</string>
|
||||
<string name="account_oauth_loading_error">Prihlásenie pomocou OAuth sa nepodarilo</string>
|
||||
<string name="account_oauth_error_canceled">Overenie zrušené</string>
|
||||
<string name="account_oauth_error_failed">Overenie sa nepodarilo s nasledujúcou chybou: <xliff:g id="error">%s</xliff:g></string>
|
||||
</resources>
|
||||
14
feature/account/oauth/src/main/res/values-sl/strings.xml
Normal file
14
feature/account/oauth/src/main/res/values-sl/strings.xml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<string name="account_oauth_sign_in_description">Za vpis je zahtevana preusmeritev k ponudniku elektronske pošte. Programu je treba odobriti dostop do računa.</string>
|
||||
<string name="account_oauth_sign_in_with_google_button">Prijavi se z Googlovim računom</string>
|
||||
<string name="account_oauth_loading_error">Vpis z OAuth je spodletel</string>
|
||||
<string name="account_oauth_error_canceled">Overitev je preklicana</string>
|
||||
<string name="account_oauth_loading_message">Prijava z uporabo OAuth</string>
|
||||
<string name="account_oauth_sign_in_button">Prijavi se</string>
|
||||
<string name="account_oauth_error_failed">Avtorizacija ni uspela z naslednjo napako: <xliff:g id="error">%s</xliff:g></string>
|
||||
<string name="account_oauth_error_not_supported">Ta ponudnik trenutno ne podpira OAuth 2.0.</string>
|
||||
<string name="account_oauth_error_browser_not_available">Aplikacija ni našla brskalnika, ki bi ga uporabila za odobritev dostopa do tvojega računa.</string>
|
||||
<string name="account_oauth_google_sign_in_support_text">Če pri vpisovanju z Googlom naletite na težave, si preberite {placeHolder}.</string>
|
||||
<string name="account_oauth_google_sign_in_support_text_link_text">članek podpore</string>
|
||||
</resources>
|
||||
14
feature/account/oauth/src/main/res/values-sq/strings.xml
Normal file
14
feature/account/oauth/src/main/res/values-sq/strings.xml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<string name="account_oauth_sign_in_with_google_button">Hyni me Google</string>
|
||||
<string name="account_oauth_loading_error">Hyrja me OAuth dështoi</string>
|
||||
<string name="account_oauth_error_failed">Autorizimi dështoi me gabimin vijues: <xliff:g id="error">%s</xliff:g></string>
|
||||
<string name="account_oauth_error_browser_not_available">Aplikacioni s’gjeti dot një shfletues për ta përdorur për akordim hyrjeje te llogaria juaj.</string>
|
||||
<string name="account_oauth_error_not_supported">OAuth 2.0 aktualisht s’mbulohet me këtë shërbim.</string>
|
||||
<string name="account_oauth_error_canceled">Autorizimi u anulua</string>
|
||||
<string name="account_oauth_loading_message">Po hyhet duke përdorur OAuth</string>
|
||||
<string name="account_oauth_sign_in_description">Do t’ju ridrejtojmë te shërbimi juaj email, që të bëni hyrjen. Lypset t’i akordoni aplikacionit hyrje në llogarinë tuaj email.</string>
|
||||
<string name="account_oauth_sign_in_button">Hyni</string>
|
||||
<string name="account_oauth_google_sign_in_support_text_link_text">artikullin e asistencës</string>
|
||||
<string name="account_oauth_google_sign_in_support_text">Nëse hasni probleme, kur bëni hyrje me Google, ju lutemi, shihni {placeHolder} tonë.</string>
|
||||
</resources>
|
||||
14
feature/account/oauth/src/main/res/values-sr/strings.xml
Normal file
14
feature/account/oauth/src/main/res/values-sr/strings.xml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<string name="account_oauth_sign_in_description">Преусмерићемо вас на вашег пружаоца имејла да бисте се пријавили. Потребно је да апликацији дате приступ за ваш имејл налог.</string>
|
||||
<string name="account_oauth_sign_in_button">Пријава</string>
|
||||
<string name="account_oauth_sign_in_with_google_button">Пријава преко Google-а</string>
|
||||
<string name="account_oauth_loading_message">Пријављивање преко OAuth-а</string>
|
||||
<string name="account_oauth_loading_error">Пријављивање преко OAuth-а није успело</string>
|
||||
<string name="account_oauth_error_canceled">Овлашћење је отказано</string>
|
||||
<string name="account_oauth_error_failed">Неуспешно овлашћење, са следећом грешком: <xliff:g id="error">%s</xliff:g></string>
|
||||
<string name="account_oauth_error_not_supported">OAuth 2.0 тренутно није подржан са овим пружаоцем.</string>
|
||||
<string name="account_oauth_error_browser_not_available">Апликација није могла да пронађе прегледач за коришћење у давању приступа вашем налогу.</string>
|
||||
<string name="account_oauth_google_sign_in_support_text">Ако имате проблема при пријављивању преко Google-а, консултујте наш {placeHolder}.</string>
|
||||
<string name="account_oauth_google_sign_in_support_text_link_text">чланак подршке</string>
|
||||
</resources>
|
||||
14
feature/account/oauth/src/main/res/values-sv/strings.xml
Normal file
14
feature/account/oauth/src/main/res/values-sv/strings.xml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<string name="account_oauth_sign_in_description">Vi kopplar vidare till din e-postoperatör för inloggning. Du behöver godkänna appåtkomst till ditt e-postkonto.</string>
|
||||
<string name="account_oauth_sign_in_with_google_button">Logga in med Google</string>
|
||||
<string name="account_oauth_error_browser_not_available">Appen kunde inte hitta en webbläsare att använda för att ge åtkomst till ditt konto.</string>
|
||||
<string name="account_oauth_error_not_supported">OAuth 2.0 stöds för närvarande inte av denna leverantör.</string>
|
||||
<string name="account_oauth_sign_in_button">Logga in</string>
|
||||
<string name="account_oauth_loading_error">OAuth-inloggning misslyckades</string>
|
||||
<string name="account_oauth_error_failed">Auktoriseringen misslyckades med följande fel: <xliff:g id="error">%s</xliff:g></string>
|
||||
<string name="account_oauth_error_canceled">Auktoriseringen avbröts</string>
|
||||
<string name="account_oauth_loading_message">Logga in med OAuth</string>
|
||||
<string name="account_oauth_google_sign_in_support_text">Om du upplever problem när du loggar in med Google, vänligen uppsök vår {placeHolder}.</string>
|
||||
<string name="account_oauth_google_sign_in_support_text_link_text">support artikel</string>
|
||||
</resources>
|
||||
3
feature/account/oauth/src/main/res/values-sw/strings.xml
Normal file
3
feature/account/oauth/src/main/res/values-sw/strings.xml
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
</resources>
|
||||
14
feature/account/oauth/src/main/res/values-ta/strings.xml
Normal file
14
feature/account/oauth/src/main/res/values-ta/strings.xml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<string name="account_oauth_error_failed">பின்வரும் பிழையுடன் ஏற்பு தோல்வியடைந்தது: <xliff:g id="error">%s</xliff:g></string>
|
||||
<string name="account_oauth_sign_in_description">உள்நுழைய உங்கள் மின்னஞ்சல் வழங்குநருக்கு நாங்கள் உங்களை திருப்பிவிடுவோம். உங்கள் மின்னஞ்சல் கணக்கிற்கான பயன்பாட்டு அணுகலை நீங்கள் வழங்க வேண்டும்.</string>
|
||||
<string name="account_oauth_loading_message">OAuth ஐப் பயன்படுத்துவதில் கையொப்பமிடுதல்</string>
|
||||
<string name="account_oauth_error_canceled">ஏற்பு ரத்து செய்யப்பட்டது</string>
|
||||
<string name="account_oauth_error_not_supported">OAUTH 2.0 தற்போது இந்த வழங்குநருடன் ஆதரிக்கப்படவில்லை.</string>
|
||||
<string name="account_oauth_error_browser_not_available">உங்கள் கணக்கிற்கு அணுகலை வழங்க பயன்படுத்த உலாவியை பயன்பாட்டால் கண்டுபிடிக்க முடியவில்லை.</string>
|
||||
<string name="account_oauth_google_sign_in_support_text">Google உடன் உள்நுழையும்போது நீங்கள் சிக்கல்களைச் சந்திக்கிறீர்கள் என்றால், தயவுசெய்து எங்கள் {ஒதுக்கிடத்தை அணுகவும்.</string>
|
||||
<string name="account_oauth_google_sign_in_support_text_link_text">உதவி கட்டுரை</string>
|
||||
<string name="account_oauth_sign_in_button">விடுபதிகை</string>
|
||||
<string name="account_oauth_sign_in_with_google_button">Google உடன் உள்நுழைக</string>
|
||||
<string name="account_oauth_loading_error">தோல்வியுற்ற OAUTH உள்நுழைவு</string>
|
||||
</resources>
|
||||
3
feature/account/oauth/src/main/res/values-th/strings.xml
Normal file
3
feature/account/oauth/src/main/res/values-th/strings.xml
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
</resources>
|
||||
14
feature/account/oauth/src/main/res/values-tr/strings.xml
Normal file
14
feature/account/oauth/src/main/res/values-tr/strings.xml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<string name="account_oauth_sign_in_with_google_button">Google ile oturum aç</string>
|
||||
<string name="account_oauth_loading_error">OAuth ile oturum açılamadı</string>
|
||||
<string name="account_oauth_error_failed">Kimlik doğrulama şu hatayla başarısız oldu: <xliff:g id="error">%s</xliff:g></string>
|
||||
<string name="account_oauth_error_browser_not_available">Uygulama, hesabınıza erişim izni vermek için kullanılacak bir tarayıcı bulamadı.</string>
|
||||
<string name="account_oauth_error_not_supported">Bu sağlayıcıda şu anda OAuth 2.0 desteklenmiyor.</string>
|
||||
<string name="account_oauth_error_canceled">Kimlik doğrulama iptal edildi</string>
|
||||
<string name="account_oauth_loading_message">OAuth ile oturum aç</string>
|
||||
<string name="account_oauth_sign_in_description">Oturum açmanız için sizi e-posta sağlayıcınıza yönlendireceğiz. Uygulamanın e-posta hesabınıza erişmesine izin vermelisiniz.</string>
|
||||
<string name="account_oauth_sign_in_button">Oturum aç</string>
|
||||
<string name="account_oauth_google_sign_in_support_text">Google ile oturum açarken sorun yaşıyorsanız lütfen {placeHolder} bakın.</string>
|
||||
<string name="account_oauth_google_sign_in_support_text_link_text">destek makalemize</string>
|
||||
</resources>
|
||||
14
feature/account/oauth/src/main/res/values-uk/strings.xml
Normal file
14
feature/account/oauth/src/main/res/values-uk/strings.xml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<string name="account_oauth_sign_in_description">Ми переадресуємо вас до вашого постачальника послуг електронної пошти для входу. Вам потрібно надати застосунку доступ до вашого облікового запису електронної пошти.</string>
|
||||
<string name="account_oauth_sign_in_button">Увійти</string>
|
||||
<string name="account_oauth_sign_in_with_google_button">Увійти за допомогою Google</string>
|
||||
<string name="account_oauth_loading_message">Увійти використовуючи OAuth</string>
|
||||
<string name="account_oauth_loading_error">Не вдалося ввійти за допомогою OAuth</string>
|
||||
<string name="account_oauth_error_canceled">Авторизація скасована</string>
|
||||
<string name="account_oauth_error_failed">Не вдалося авторизувати через цю помилку: <xliff:g id="error">%s</xliff:g></string>
|
||||
<string name="account_oauth_error_not_supported">Цей постачальник наразі не підтримує OAuth 2.0.</string>
|
||||
<string name="account_oauth_error_browser_not_available">Застосунок не може знайти браузер для надання доступу до вашого облікового запису.</string>
|
||||
<string name="account_oauth_google_sign_in_support_text">Якщо у вас виникли проблеми під час входу в Google, зверніться до нашої {placeHolder}.</string>
|
||||
<string name="account_oauth_google_sign_in_support_text_link_text">довідкової статті</string>
|
||||
</resources>
|
||||
14
feature/account/oauth/src/main/res/values-vi/strings.xml
Normal file
14
feature/account/oauth/src/main/res/values-vi/strings.xml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<string name="account_oauth_sign_in_with_google_button">Đăng nhập bằng Google</string>
|
||||
<string name="account_oauth_loading_error">Đăng nhập OAuth không thành công</string>
|
||||
<string name="account_oauth_error_failed">Việc ủy quyền không thành công với lỗi sau: <xliff:g id="error">%s</xliff:g></string>
|
||||
<string name="account_oauth_error_browser_not_available">Ứng dụng không thể tìm thấy trình duyệt dùng để cấp quyền truy cập vào tài khoản của bạn.</string>
|
||||
<string name="account_oauth_error_not_supported">OAuth 2.0 hiện không được nhà cung cấp này hỗ trợ.</string>
|
||||
<string name="account_oauth_error_canceled">Đã hủy ủy quyền</string>
|
||||
<string name="account_oauth_loading_message">Đăng nhập bằng OAuth</string>
|
||||
<string name="account_oauth_sign_in_description">Chúng tôi sẽ chuyển hướng bạn đến nhà cung cấp email của bạn để đăng nhập. Bạn cần cấp cho ứng dụng quyền truy cập vào tài khoản email của mình.</string>
|
||||
<string name="account_oauth_sign_in_button">Đăng nhập</string>
|
||||
<string name="account_oauth_google_sign_in_support_text">Nếu bạn đang gặp vấn đề khi đăng nhập với Google, hãy xem qua {placeHolder} của chúng tôi.</string>
|
||||
<string name="account_oauth_google_sign_in_support_text_link_text">bài viết hỗ trợ</string>
|
||||
</resources>
|
||||
14
feature/account/oauth/src/main/res/values-zh-rCN/strings.xml
Normal file
14
feature/account/oauth/src/main/res/values-zh-rCN/strings.xml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<string name="account_oauth_sign_in_with_google_button">使用 Google 登录</string>
|
||||
<string name="account_oauth_loading_error">OAuth 登录失败</string>
|
||||
<string name="account_oauth_error_failed">授权失败,错误如下:<xliff:g id="error">%s</xliff:g></string>
|
||||
<string name="account_oauth_error_browser_not_available">此应用找不到用于授权访问您账号的浏览器。</string>
|
||||
<string name="account_oauth_error_not_supported">此提供者目前不支持 OAuth 2.0。</string>
|
||||
<string name="account_oauth_error_canceled">授权已取消</string>
|
||||
<string name="account_oauth_loading_message">使用 OAuth 登录</string>
|
||||
<string name="account_oauth_sign_in_description">我们会将您重定向到您的邮件服务提供者网站进行登录。您需要授权此应用访问您的电子邮件账号。</string>
|
||||
<string name="account_oauth_sign_in_button">登录</string>
|
||||
<string name="account_oauth_google_sign_in_support_text_link_text">支持文章</string>
|
||||
<string name="account_oauth_google_sign_in_support_text">如果登录 Google 时遇到问题,请咨询我们的 {placeHolder}。</string>
|
||||
</resources>
|
||||
14
feature/account/oauth/src/main/res/values-zh-rTW/strings.xml
Normal file
14
feature/account/oauth/src/main/res/values-zh-rTW/strings.xml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<string name="account_oauth_sign_in_with_google_button">使用 Google 登入</string>
|
||||
<string name="account_oauth_loading_error">OAuth 登入失敗</string>
|
||||
<string name="account_oauth_error_failed">授權失敗,出現以下錯誤:<xliff:g id="error">%s</xliff:g></string>
|
||||
<string name="account_oauth_error_browser_not_available">此應用程式找不到用於授予帳號存取權限的瀏覽器。</string>
|
||||
<string name="account_oauth_error_not_supported">此提供者目前不支援 OAuth 2.0。</string>
|
||||
<string name="account_oauth_error_canceled">授權被取消</string>
|
||||
<string name="account_oauth_loading_message">使用 OAuth 登入</string>
|
||||
<string name="account_oauth_sign_in_description">我們會將您重新導向至您的電子郵件提供者頁面進行登入。您需要授予此應用程式存取您的電子郵件帳號的權限。</string>
|
||||
<string name="account_oauth_sign_in_button">登入</string>
|
||||
<string name="account_oauth_google_sign_in_support_text">如果您在使用 Google 登入時遇到問題,請諮詢我們的 {placeHolder}。</string>
|
||||
<string name="account_oauth_google_sign_in_support_text_link_text">支援指南</string>
|
||||
</resources>
|
||||
18
feature/account/oauth/src/main/res/values/strings.xml
Normal file
18
feature/account/oauth/src/main/res/values/strings.xml
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<string name="account_oauth_sign_in_description">We\'ll redirect you to your email provider to sign in. You need to grant the app access to your email account.</string>
|
||||
<string name="account_oauth_sign_in_button">Sign in</string>
|
||||
<string name="account_oauth_sign_in_with_google_button">Sign in with Google</string>
|
||||
<string name="account_oauth_loading_message">Signing in using OAuth</string>
|
||||
<string name="account_oauth_loading_error">OAuth sign in failed</string>
|
||||
|
||||
<string name="account_oauth_error_canceled">Authorization canceled</string>
|
||||
<string name="account_oauth_error_failed">Authorization failed with the following error: <xliff:g id="error">%s</xliff:g></string>
|
||||
<string name="account_oauth_error_not_supported">OAuth 2.0 is currently not supported with this provider.</string>
|
||||
<string name="account_oauth_error_browser_not_available">The app couldn\'t find a browser to use for granting access to your account.</string>
|
||||
|
||||
<!-- This is displayed below the "Sign in with Google" button. {placeHolder} will be replaced with the text from account_oauth_google_sign_in_support_text_link_text. -->
|
||||
<string name="account_oauth_google_sign_in_support_text">"If you're experiencing problems when signing in with Google, please consult our {placeHolder}."</string>
|
||||
<!-- The {placeHolder} in account_oauth_google_sign_in_support_text will be replaced by this text (that, in the user interface, will be a link to the support article). -->
|
||||
<string name="account_oauth_google_sign_in_support_text_link_text">support article</string>
|
||||
</resources>
|
||||
|
|
@ -0,0 +1,260 @@
|
|||
package app.k9mail.feature.account.oauth.data
|
||||
|
||||
import android.content.Intent
|
||||
import android.net.Uri
|
||||
import androidx.core.net.toUri
|
||||
import app.k9mail.feature.account.oauth.domain.entity.AuthorizationIntentResult
|
||||
import app.k9mail.feature.account.oauth.domain.entity.AuthorizationResult
|
||||
import assertk.all
|
||||
import assertk.assertThat
|
||||
import assertk.assertions.isEqualTo
|
||||
import assertk.assertions.isNotEmpty
|
||||
import assertk.assertions.isNotNull
|
||||
import assertk.assertions.isNull
|
||||
import assertk.assertions.prop
|
||||
import kotlinx.coroutines.test.runTest
|
||||
import net.openid.appauth.AuthState
|
||||
import net.openid.appauth.AuthorizationException
|
||||
import net.openid.appauth.AuthorizationRequest
|
||||
import net.openid.appauth.AuthorizationResponse
|
||||
import net.openid.appauth.AuthorizationService
|
||||
import net.openid.appauth.AuthorizationService.TokenResponseCallback
|
||||
import net.openid.appauth.AuthorizationServiceConfiguration
|
||||
import net.openid.appauth.GrantTypeValues
|
||||
import net.openid.appauth.ResponseTypeValues
|
||||
import net.openid.appauth.TokenRequest
|
||||
import net.openid.appauth.TokenResponse
|
||||
import net.thunderbird.core.common.oauth.OAuthConfiguration
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
import org.mockito.kotlin.any
|
||||
import org.mockito.kotlin.argumentCaptor
|
||||
import org.mockito.kotlin.doAnswer
|
||||
import org.mockito.kotlin.mock
|
||||
import org.mockito.kotlin.stub
|
||||
import org.robolectric.RobolectricTestRunner
|
||||
|
||||
@RunWith(RobolectricTestRunner::class)
|
||||
class AuthorizationRepositoryTest {
|
||||
|
||||
private val service: AuthorizationService = mock<AuthorizationService>()
|
||||
|
||||
@Test
|
||||
fun `getAuthorizationRequestIntent should return Success with intent when hostname has oauth configuration`() =
|
||||
runTest {
|
||||
val testSubject = AuthorizationRepository(
|
||||
service = service,
|
||||
)
|
||||
val emailAddress = "emailAddress"
|
||||
val intent = Intent()
|
||||
val authRequestCapture = argumentCaptor<AuthorizationRequest>().apply {
|
||||
service.stub { on { getAuthorizationRequestIntent(capture()) }.thenReturn(intent) }
|
||||
}
|
||||
|
||||
// When
|
||||
val result = testSubject.getAuthorizationRequestIntent(oAuthConfiguration, emailAddress)
|
||||
|
||||
// Then
|
||||
assertThat(result).isEqualTo(
|
||||
AuthorizationIntentResult.Success(
|
||||
intent = intent,
|
||||
),
|
||||
)
|
||||
assertThat(authRequestCapture.firstValue).all {
|
||||
prop(AuthorizationRequest::configuration).all {
|
||||
prop(AuthorizationServiceConfiguration::authorizationEndpoint).isEqualTo(
|
||||
oAuthConfiguration.authorizationEndpoint.toUri(),
|
||||
)
|
||||
prop(AuthorizationServiceConfiguration::tokenEndpoint).isEqualTo(
|
||||
oAuthConfiguration.tokenEndpoint.toUri(),
|
||||
)
|
||||
}
|
||||
prop(AuthorizationRequest::clientId).isEqualTo(oAuthConfiguration.clientId)
|
||||
prop(AuthorizationRequest::responseType).isEqualTo(ResponseTypeValues.CODE)
|
||||
prop(AuthorizationRequest::redirectUri).isEqualTo(oAuthConfiguration.redirectUri.toUri())
|
||||
prop(AuthorizationRequest::scope).isEqualTo("scope scope2")
|
||||
prop(AuthorizationRequest::loginHint).isEqualTo(emailAddress)
|
||||
prop(AuthorizationRequest::codeVerifier).isNotNull()
|
||||
prop(AuthorizationRequest::codeVerifierChallengeMethod).isEqualTo("S256")
|
||||
prop(AuthorizationRequest::codeVerifierChallenge).isNotNull().isNotEmpty()
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `getAuthorizationResponse should return AuthorizationResponse when intent invalid`() = runTest {
|
||||
val testSubject = AuthorizationRepository(
|
||||
service = service,
|
||||
)
|
||||
val intent = Intent().apply {
|
||||
putExtra(AuthorizationResponse.EXTRA_RESPONSE, authorizationResponse.jsonSerializeString())
|
||||
}
|
||||
|
||||
// When
|
||||
val result = testSubject.getAuthorizationResponse(intent)
|
||||
|
||||
// Then
|
||||
assertThat(result).isNotNull().all {
|
||||
prop(AuthorizationResponse::request).all {
|
||||
prop(AuthorizationRequest::configuration).all {
|
||||
prop(AuthorizationServiceConfiguration::authorizationEndpoint).isEqualTo(
|
||||
authorizationConfiguration.authorizationEndpoint,
|
||||
)
|
||||
prop(AuthorizationServiceConfiguration::tokenEndpoint).isEqualTo(
|
||||
authorizationConfiguration.tokenEndpoint,
|
||||
)
|
||||
}
|
||||
prop(AuthorizationRequest::clientId).isEqualTo(authorizationRequest.clientId)
|
||||
prop(AuthorizationRequest::responseType).isEqualTo(authorizationRequest.responseType)
|
||||
prop(AuthorizationRequest::redirectUri).isEqualTo(authorizationRequest.redirectUri)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `getAuthorizationResponse should return null when intent is invalid`() = runTest {
|
||||
val testSubject = AuthorizationRepository(
|
||||
service = service,
|
||||
)
|
||||
val intent = Intent()
|
||||
|
||||
// When
|
||||
val result = testSubject.getAuthorizationResponse(intent)
|
||||
|
||||
// Then
|
||||
assertThat(result).isNull()
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `getAuthorizationException should return AuthorizationException when intent is valid`() = runTest {
|
||||
val testSubject = AuthorizationRepository(
|
||||
service = service,
|
||||
)
|
||||
val authorizationException = AuthorizationException(
|
||||
AuthorizationException.TYPE_OAUTH_AUTHORIZATION_ERROR,
|
||||
1,
|
||||
"error",
|
||||
"errorDescription",
|
||||
Uri.parse("https://example.com/errorUri"),
|
||||
null,
|
||||
)
|
||||
val intent = Intent().apply {
|
||||
putExtra(AuthorizationException.EXTRA_EXCEPTION, authorizationException.toJsonString())
|
||||
}
|
||||
|
||||
// When
|
||||
val result = testSubject.getAuthorizationException(intent)
|
||||
|
||||
// Then
|
||||
assertThat(result).isEqualTo(authorizationException)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `getAuthorizationException should return null when intent is invalid`() = runTest {
|
||||
val testSubject = AuthorizationRepository(
|
||||
service = service,
|
||||
)
|
||||
val intent = Intent()
|
||||
|
||||
// When
|
||||
val result = testSubject.getAuthorizationException(intent)
|
||||
|
||||
// Then
|
||||
assertThat(result).isNull()
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `getExchangeToken should return success when tokenRequest successful`() = runTest {
|
||||
val testSubject = AuthorizationRepository(
|
||||
service = service,
|
||||
)
|
||||
val tokenRequest = TokenRequest.Builder(
|
||||
authorizationConfiguration,
|
||||
authorizationRequest.clientId,
|
||||
).setGrantType(GrantTypeValues.AUTHORIZATION_CODE)
|
||||
.setAuthorizationCode("authorizationCode")
|
||||
.setRedirectUri(authorizationRequest.redirectUri)
|
||||
.build()
|
||||
val tokenResponse = TokenResponse.Builder(tokenRequest)
|
||||
.build()
|
||||
service.stub {
|
||||
on { performTokenRequest(any(), any()) } doAnswer {
|
||||
val callback = it.getArgument(1, TokenResponseCallback::class.java)
|
||||
callback.onTokenRequestCompleted(tokenResponse, null)
|
||||
}
|
||||
}
|
||||
|
||||
val result = testSubject.getExchangeToken(authorizationResponse)
|
||||
|
||||
val expectedAuthState = AuthState(authorizationResponse, tokenResponse, null)
|
||||
val successAuthorizationState = expectedAuthState.toAuthorizationState()
|
||||
|
||||
assertThat(result).isEqualTo(AuthorizationResult.Success(successAuthorizationState))
|
||||
}
|
||||
|
||||
fun `getExchangeToken should return failure when tokenRequest failure`() = runTest {
|
||||
val testSubject = AuthorizationRepository(
|
||||
service = service,
|
||||
)
|
||||
val authorizationException = AuthorizationException(
|
||||
AuthorizationException.TYPE_OAUTH_AUTHORIZATION_ERROR,
|
||||
1,
|
||||
"error",
|
||||
"errorDescription",
|
||||
Uri.parse("https://example.com/errorUri"),
|
||||
null,
|
||||
)
|
||||
service.stub {
|
||||
on { performTokenRequest(any(), any()) } doAnswer {
|
||||
val callback = it.getArgument(1, TokenResponseCallback::class.java)
|
||||
callback.onTokenRequestCompleted(null, authorizationException)
|
||||
}
|
||||
}
|
||||
|
||||
val result = testSubject.getExchangeToken(authorizationResponse)
|
||||
|
||||
assertThat(result).isEqualTo(AuthorizationResult.Failure(authorizationException))
|
||||
}
|
||||
|
||||
fun `getExchangeToken should return unknown failure when tokenRequest null for response and exception`() = runTest {
|
||||
val testSubject = AuthorizationRepository(
|
||||
service = service,
|
||||
)
|
||||
val exception = Exception("Unknown error")
|
||||
service.stub {
|
||||
on { performTokenRequest(any(), any()) } doAnswer {
|
||||
val callback = it.getArgument(1, TokenResponseCallback::class.java)
|
||||
callback.onTokenRequestCompleted(null, null)
|
||||
}
|
||||
}
|
||||
|
||||
val result = testSubject.getExchangeToken(authorizationResponse)
|
||||
|
||||
assertThat(result).isEqualTo(AuthorizationResult.Failure(exception))
|
||||
}
|
||||
|
||||
private companion object {
|
||||
val oAuthConfiguration = OAuthConfiguration(
|
||||
clientId = "clientId",
|
||||
scopes = listOf("scope", "scope2"),
|
||||
authorizationEndpoint = "auth.example.com",
|
||||
tokenEndpoint = "token.example.com",
|
||||
redirectUri = "redirect.example.com",
|
||||
)
|
||||
|
||||
val authorizationConfiguration = AuthorizationServiceConfiguration(
|
||||
Uri.parse("https://example.com/authorize"),
|
||||
Uri.parse("https://example.com/token"),
|
||||
)
|
||||
|
||||
val authorizationRequest = AuthorizationRequest.Builder(
|
||||
authorizationConfiguration,
|
||||
"clientId",
|
||||
"responseType",
|
||||
Uri.parse("https://example.com/redirectUri"),
|
||||
).build()
|
||||
|
||||
val authorizationResponse = AuthorizationResponse.Builder(authorizationRequest)
|
||||
.setAuthorizationCode("authorizationCode")
|
||||
.build()
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
package app.k9mail.feature.account.oauth.data
|
||||
|
||||
import android.net.Uri
|
||||
import assertk.assertThat
|
||||
import assertk.assertions.isFalse
|
||||
import assertk.assertions.isTrue
|
||||
import kotlinx.coroutines.test.runTest
|
||||
import net.openid.appauth.AuthState
|
||||
import net.openid.appauth.AuthorizationServiceConfiguration
|
||||
import net.openid.appauth.TokenRequest
|
||||
import net.openid.appauth.TokenResponse
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
import org.robolectric.RobolectricTestRunner
|
||||
|
||||
@RunWith(RobolectricTestRunner::class)
|
||||
class AuthorizationStateRepositoryTest {
|
||||
|
||||
@Test
|
||||
fun `should return false with unauthorized auth state`() = runTest {
|
||||
val authState = AuthState()
|
||||
val authorizationState = authState.toAuthorizationState()
|
||||
val testSubject = AuthorizationStateRepository()
|
||||
|
||||
val result = testSubject.isAuthorized(authorizationState)
|
||||
|
||||
assertThat(result).isFalse()
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `should return true with authorized auth state`() = runTest {
|
||||
val authState = AuthState()
|
||||
val clientId = "clientId"
|
||||
val configuration = AuthorizationServiceConfiguration(
|
||||
Uri.parse("https://example.com"),
|
||||
Uri.parse("https://example.com"),
|
||||
)
|
||||
val tokenRequest = TokenRequest.Builder(configuration, clientId)
|
||||
.setGrantType(TokenRequest.GRANT_TYPE_PASSWORD)
|
||||
.build()
|
||||
val tokenResponse = TokenResponse.Builder(tokenRequest)
|
||||
.setAccessToken("accessToken")
|
||||
.setIdToken("idToken")
|
||||
.build()
|
||||
authState.update(tokenResponse, null)
|
||||
val authorizationState = authState.toAuthorizationState()
|
||||
|
||||
val testSubject = AuthorizationStateRepository()
|
||||
|
||||
val result = testSubject.isAuthorized(authorizationState)
|
||||
|
||||
assertThat(result).isTrue()
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
package app.k9mail.feature.account.oauth.domain
|
||||
|
||||
import android.content.Intent
|
||||
import app.k9mail.feature.account.oauth.domain.entity.AuthorizationIntentResult
|
||||
import app.k9mail.feature.account.oauth.domain.entity.AuthorizationResult
|
||||
import net.openid.appauth.AuthorizationException
|
||||
import net.openid.appauth.AuthorizationResponse
|
||||
import net.thunderbird.core.common.oauth.OAuthConfiguration
|
||||
|
||||
class FakeAuthorizationRepository(
|
||||
private val answerGetAuthorizationRequestIntent: AuthorizationIntentResult = AuthorizationIntentResult.NotSupported,
|
||||
private val answerGetAuthorizationResponse: AuthorizationResponse? = null,
|
||||
private val answerGetAuthorizationException: AuthorizationException? = null,
|
||||
private val answerGetExchangeToken: AuthorizationResult = AuthorizationResult.Canceled,
|
||||
) : AccountOAuthDomainContract.AuthorizationRepository {
|
||||
|
||||
var recordedGetAuthorizationRequestIntentConfiguration: OAuthConfiguration? = null
|
||||
var recordedGetAuthorizationRequestIntentEmailAddress: String? = null
|
||||
override fun getAuthorizationRequestIntent(
|
||||
configuration: OAuthConfiguration,
|
||||
emailAddress: String,
|
||||
): AuthorizationIntentResult {
|
||||
recordedGetAuthorizationRequestIntentConfiguration = configuration
|
||||
recordedGetAuthorizationRequestIntentEmailAddress = emailAddress
|
||||
return answerGetAuthorizationRequestIntent
|
||||
}
|
||||
|
||||
var recordedGetAuthorizationResponseIntent: Intent? = null
|
||||
|
||||
override suspend fun getAuthorizationResponse(intent: Intent): AuthorizationResponse? {
|
||||
recordedGetAuthorizationResponseIntent = intent
|
||||
return answerGetAuthorizationResponse
|
||||
}
|
||||
|
||||
var recordedGetAuthorizationExceptionIntent: Intent? = null
|
||||
|
||||
override suspend fun getAuthorizationException(intent: Intent): AuthorizationException? {
|
||||
recordedGetAuthorizationExceptionIntent = intent
|
||||
return answerGetAuthorizationException
|
||||
}
|
||||
|
||||
var recordedGetExchangeTokenResponse: AuthorizationResponse? = null
|
||||
|
||||
override suspend fun getExchangeToken(
|
||||
response: AuthorizationResponse,
|
||||
): AuthorizationResult {
|
||||
recordedGetExchangeTokenResponse = response
|
||||
return answerGetExchangeToken
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
package app.k9mail.feature.account.oauth.domain.usecase
|
||||
|
||||
import assertk.assertThat
|
||||
import assertk.assertions.isFalse
|
||||
import assertk.assertions.isTrue
|
||||
import org.junit.Test
|
||||
|
||||
class CheckIsGoogleSignInTest {
|
||||
|
||||
private val testSubject = CheckIsGoogleSignIn()
|
||||
|
||||
@Test
|
||||
fun `should return true when hostname ends with a google domain`() {
|
||||
val hostnames = listOf(
|
||||
"mail.gmail.com",
|
||||
"mail.googlemail.com",
|
||||
"mail.google.com",
|
||||
)
|
||||
|
||||
for (hostname in hostnames) {
|
||||
assertThat(testSubject.execute(hostname)).isTrue()
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `should return false when hostname does not end with a google domain`() {
|
||||
val hostnames = listOf(
|
||||
"mail.example.com",
|
||||
"mail.example.org",
|
||||
"mail.example.net",
|
||||
)
|
||||
|
||||
for (hostname in hostnames) {
|
||||
assertThat(testSubject.execute(hostname)).isFalse()
|
||||
}
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue