mirror of
https://github.com/home-assistant/android
synced 2024-09-19 16:11:37 +00:00
Only check redirect uri if it starts with AUTH_CALLBACK (#1068)
This commit is contained in:
parent
16625e9614
commit
52fec8cffd
|
@ -36,7 +36,7 @@ class AuthenticationPresenterImpl @Inject constructor(
|
||||||
|
|
||||||
override fun onRedirectUrl(redirectUrl: String): Boolean {
|
override fun onRedirectUrl(redirectUrl: String): Boolean {
|
||||||
val code = Uri.parse(redirectUrl).getQueryParameter("code")
|
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 {
|
mainScope.launch {
|
||||||
try {
|
try {
|
||||||
authenticationUseCase.registerAuthorizationCode(code)
|
authenticationUseCase.registerAuthorizationCode(code)
|
||||||
|
|
Loading…
Reference in a new issue