From fd2ff8b11c2ebc77ded88e0830a51bab14de909d Mon Sep 17 00:00:00 2001 From: Juan David Nicholls Cardona Date: Thu, 14 Nov 2019 23:25:22 -0500 Subject: [PATCH 1/2] Validate cancel type from auth redirection --- src/InAppBrowser.common.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/InAppBrowser.common.ts b/src/InAppBrowser.common.ts index 109308c..c0aa863 100644 --- a/src/InAppBrowser.common.ts +++ b/src/InAppBrowser.common.ts @@ -77,7 +77,7 @@ function _checkResultAndReturnUrl( result: AuthSessionResult ): Promise { return new Promise(function(resolve) { - if (android) { + if (android && result.type !== 'cancel') { android.once( AndroidApplication.activityResumedEvent, function(args: AndroidActivityEventData) { From ebdfa019459fda8a8472e5f852debd828cee0e01 Mon Sep 17 00:00:00 2001 From: Juan David Nicholls Cardona Date: Thu, 14 Nov 2019 23:42:06 -0500 Subject: [PATCH 2/2] Release 2.2.0 --- CHANGELOG.md | 7 ++++++- src/package-lock.json | 2 +- src/package.json | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 80daf9d..f86f24d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,10 @@ in case of vulnerabilities. ## [Unreleased] +## [2.2.0] - 2019-11-14 +### Added +- Validate if the **type** of the auth result is different to `cancel` before to check the url of the last redirection from **Android**. + ## [2.1.1] - 2019-11-14 ### Fixed - Fixed issue about `headers` option not working from **Android** [#16](https://github.com/proyecto26/nativescript-inappbrowser/issues/16). @@ -56,7 +60,8 @@ in case of vulnerabilities. - Methods to open and close external urls to authenticate the user **(openAuth, closeAuth)** using deep linking. - `isAvailable` method to detect if the device supports the plugin. -[Unreleased]: https://github.com/proyecto26/nativescript-inappbrowser/compare/v2.1.1...HEAD +[Unreleased]: https://github.com/proyecto26/nativescript-inappbrowser/compare/v2.2.0...HEAD +[2.2.0]: https://github.com/proyecto26/nativescript-inappbrowser/compare/v2.1.1...v2.2.0 [2.1.1]: https://github.com/proyecto26/nativescript-inappbrowser/compare/v2.1.0...v2.1.1 [2.1.0]: https://github.com/proyecto26/nativescript-inappbrowser/compare/v2.0.0...v2.1.0 [2.0.0]: https://github.com/proyecto26/nativescript-inappbrowser/compare/v1.0.0...v2.0.0 diff --git a/src/package-lock.json b/src/package-lock.json index 384f552..4f6f94e 100644 --- a/src/package-lock.json +++ b/src/package-lock.json @@ -1,6 +1,6 @@ { "name": "nativescript-inappbrowser", - "version": "2.1.1", + "version": "2.2.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/src/package.json b/src/package.json index 9e78cde..e17c408 100644 --- a/src/package.json +++ b/src/package.json @@ -1,6 +1,6 @@ { "name": "nativescript-inappbrowser", - "version": "2.1.1", + "version": "2.2.0", "description": "InAppBrowser for NativeScript", "main": "InAppBrowser", "typings": "index.d.ts",