Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5e775bcc authored by Hasib Prince's avatar Hasib Prince
Browse files

updated authvalidation process

parent 5dd40f10
Loading
Loading
Loading
Loading
Loading
+16 −26
Original line number Diff line number Diff line
@@ -241,18 +241,8 @@ class LoginSourceGPlay @Inject constructor(
    }

    override suspend fun validateAuth(): AuthObject? {
        val authData = getSavedAuthData()

        // validate authData and save it if nothing is saved (first time use.)
        authData?.let {
            validateAuthData(authData).run {
                if (isSuccess()) {
                    saveAuthData(authData)
                }
                return AuthObject.GPlayAuth(this, user)
            }
        }

        return null
        clearSavedAuth()
        val authObject = getAuthObject()
        return if (authObject.result.isSuccess()) authObject else null
    }
}