Bumps Application Services to v62.0.0 #7694
Conversation
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") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will create an issue for this, probably going to require upstream consumers to set the entrypoint
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right. Adding a bit of context: FxA basically considers any attempt to load the login page without an entrypoint
parameter to be a metrics bug, as we have no way of attributing the signin metrics for that flow back to a particular UI touchpoint. Making this a required argument surfaces that requirement to the application, so we probably don't want to paper over it at this level. (Although @grigoryk might prefer to paper over it here for a short period while considering the API implications).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we do decide to temporarily hard-code a default entrypoint here, I suggest the string "none"; this is what FxA uses internally when you don't provide an explicit entrypoint value.
@@ -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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not necessarily for this PR, but flagging for future consideration - we should consider pushing the AuthorizationParams
abstraction up through the API layers here, so that callers of the higher-level API can pass all the new properties in a sensible way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, we can do that in a follow-up.
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") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right. Adding a bit of context: FxA basically considers any attempt to load the login page without an entrypoint
parameter to be a metrics bug, as we have no way of attributing the signin metrics for that flow back to a particular UI touchpoint. Making this a required argument surfaces that requirement to the application, so we probably don't want to paper over it at this level. (Although @grigoryk might prefer to paper over it here for a short period while considering the API implications).
bors try ^ To run UI automation. |
tryBuild succeeded: |
Ping! What's the timeline on getting this merged? 🙏 😉 |
@eliserichards should merge today, hopefully. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, we can do that in a follow-up.
New plan: we'll land 61.0.9 first (with a logins crash fix and the metrics extension), and hopefully try to get it onto beta/nightly first. That gives us time to actually do the API bits for this PR properly. |
Connects to mozilla/application-services#3337
Bumps Application Services to 62.0.0
v62.0.0 (2020-07-13)
Full Changelog
FxA Client
entrypoint
in oauth flow APIs: consumers ofbeginOAuthFlow
andbeginPairingFlow
(beginAuthentication
andbeginPairingAuthentication
in ios) are now required to pass anentrypoint
argument that would be used for metrics. This puts thebeginOAuthFlow
andbeginPairingFlow
APIs inline with other existing APIs, likegetManageAccountUrl
. (#3265)authorizeOAuthCode
API to now accept anAuthorizationParams
object instead of the individual parameters. TheAuthorizationParams
also includes optionalAuthorizationPKCEParams
that contain thecodeChallenge
,codeChallengeMethod
.AuthorizationParams
also includes an optionalkeysJwk
for requesting keys (#3264)What's new
beginOAuthFlow
andbeginPairingFlow
(beginAuthentication
andbeginPairingAuthentication
in ios). Those parameters can be passed in using aMetricsParams
struct/class.MetricsParams
is defined in both the Kotlin and Swift bindings. The parameters are the following (#3328):Logins
What's fixed
form_submit_url
would incorrectlyreject the entry as invalid (#3331).
Tabs
What's new
of Firefox Desktop clients (#3322).