1
0
Fork 0

Closes #1315: Re-introduce FxA interceptor to make auth work

This was removed accidentally, let's add it back in, but now with a clarifying comment :)
master
Grisha Kruglov 2019-04-04 12:41:06 -07:00 committed by Jeff Boek
parent 04f8a25bce
commit 56da21c525
1 changed files with 6 additions and 0 deletions

View File

@ -9,8 +9,14 @@ import mozilla.components.browser.errorpages.ErrorPages
import mozilla.components.browser.errorpages.ErrorType
import mozilla.components.concept.engine.EngineSession
import mozilla.components.concept.engine.request.RequestInterceptor
import org.mozilla.fenix.ext.components
class AppRequestInterceptor(private val context: Context) : RequestInterceptor {
override fun onLoadRequest(session: EngineSession, uri: String): RequestInterceptor.InterceptionResponse? {
// Accounts uses interception to check for a "success URL" in the sign-in flow to finalize authentication.
return context.components.services.accountsAuthFeature.interceptor.onLoadRequest(session, uri)
}
override fun onErrorRequest(
session: EngineSession,
errorType: ErrorType,