Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Commit

Permalink
Try #7694:
Browse files Browse the repository at this point in the history
  • Loading branch information
MozLando committed Jul 13, 2020
2 parents cdef87e + 526688f commit 542ee0e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion buildSrc/src/main/java/Dependencies.kt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ object Versions {
const val disklrucache = "2.0.2"
const val leakcanary = "1.6.3"

const val mozilla_appservices = "61.0.7"
const val mozilla_appservices = "62.0.0"

const val mozilla_glean = "31.2.3"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import kotlinx.coroutines.Deferred
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.SupervisorJob
import kotlinx.coroutines.plus
import mozilla.appservices.fxaclient.AuthorizationParams
import mozilla.appservices.fxaclient.FirefoxAccount as InternalFxAcct
import mozilla.components.concept.sync.AccessType
import mozilla.components.concept.sync.AuthFlowUrl
Expand Down Expand Up @@ -101,15 +102,15 @@ class FirefoxAccount internal constructor(

override fun beginOAuthFlowAsync(scopes: Set<String>) = scope.async {
handleFxaExceptions(logger, "begin oauth flow", { null }) {
val url = inner.beginOAuthFlow(scopes.toTypedArray())
val url = inner.beginOAuthFlow(scopes.toTypedArray(), "notset")
val state = Uri.parse(url).getQueryParameter("state")!!
AuthFlowUrl(state, url)
}
}

override fun beginPairingFlowAsync(pairingUrl: String, scopes: Set<String>) = scope.async {
handleFxaExceptions(logger, "begin oauth pairing flow", { null }) {
val url = inner.beginPairingFlow(pairingUrl, scopes.toTypedArray())
val url = inner.beginPairingFlow(pairingUrl, scopes.toTypedArray(), "notset")
val state = Uri.parse(url).getQueryParameter("state")!!
AuthFlowUrl(state, url)
}
Expand Down Expand Up @@ -140,7 +141,8 @@ class FirefoxAccount internal constructor(
accessType: AccessType
) = scope.async {
handleFxaExceptions(logger, "authorizeOAuthCode", { null }) {
inner.authorizeOAuthCode(clientId, scopes, state, accessType.msg)
val authParams = AuthorizationParams(clientId, scopes, state, accessType.msg)
inner.authorizeOAuthCode(authParams)
}
}

Expand Down

0 comments on commit 542ee0e

Please sign in to comment.