Only check redirect uri if it starts with AUTH_CALLBACK (#1068)

This commit is contained in:
Paulus Schoutsen 2020-10-17 15:31:19 +02:00 committed by GitHub
parent 16625e9614
commit 52fec8cffd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -36,7 +36,7 @@ class AuthenticationPresenterImpl @Inject constructor(
override fun onRedirectUrl(redirectUrl: String): Boolean {
val code = Uri.parse(redirectUrl).getQueryParameter("code")
return if (redirectUrl.contains(AUTH_CALLBACK) && !code.isNullOrBlank()) {
return if (redirectUrl.startsWith(AUTH_CALLBACK) && !code.isNullOrBlank()) {
mainScope.launch {
try {
authenticationUseCase.registerAuthorizationCode(code)