Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id A5631200D5B for ; Wed, 13 Dec 2017 16:51:08 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id A3FA9160C23; Wed, 13 Dec 2017 15:51:08 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id EACF8160C16 for ; Wed, 13 Dec 2017 16:51:07 +0100 (CET) Received: (qmail 95188 invoked by uid 500); 13 Dec 2017 15:51:07 -0000 Mailing-List: contact issues-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@cordova.apache.org Received: (qmail 95175 invoked by uid 99); 13 Dec 2017 15:51:07 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Dec 2017 15:51:07 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 822351A0F71 for ; Wed, 13 Dec 2017 15:51:06 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -98.001 X-Spam-Level: X-Spam-Status: No, score=-98.001 tagged_above=-999 required=6.31 tests=[KAM_BADIPHTTP=2, NORMAL_HTTP_TO_IP=0.001, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id q9_APdkcbiEO for ; Wed, 13 Dec 2017 15:51:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 7CFAD5F573 for ; Wed, 13 Dec 2017 15:51:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id AE9C6E1288 for ; Wed, 13 Dec 2017 15:51:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 5109F212FF for ; Wed, 13 Dec 2017 15:51:00 +0000 (UTC) Date: Wed, 13 Dec 2017 15:51:00 +0000 (UTC) From: "Martin Birkby (JIRA)" To: issues@cordova.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CB-13676) InAppBrowser event.url is always lowercase MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 13 Dec 2017 15:51:08 -0000 [ https://issues.apache.org/jira/browse/CB-13676?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16289419#comment-16289419 ] Martin Birkby commented on CB-13676: ------------------------------------ I've just made a mock up of this scenario using a mock oath server and the problem doesn't seem to occur in that. Not sure where this issue is coming from but it doesn't appear to be from the InAppBrowser itself. Using the original OAuth server case is maintained when returning the redirect to normal browser but not when it is returning it to InAppBrowser via the event url. I think this needs more investigation on my part. I'm sure it's not event.url causing the issue for me at least. Apologies for taking up your time. Please close this issue, will report back once I've tracked down what is changing the case! Sorry! > InAppBrowser event.url is always lowercase > ------------------------------------------ > > Key: CB-13676 > URL: https://issues.apache.org/jira/browse/CB-13676 > Project: Apache Cordova > Issue Type: Bug > Components: cordova-plugin-inappbrowser > Environment: osx 10.13, xcode 9.2, ios 11.2, cordova-ios@4.5.1, cordova-plugin-device@1.1.4, cordova-plugin-inappbrowser@1.7.2, cordova-plugin-ionic-webview@1.1.16, cordova-plugin-whitelist@1.3.1 > Reporter: Martin Birkby > > Hi, > Trying to implement OAuth for a custom OAuth provider. The token that is returned contains Base64 encoded information which is lost as the event.url from the InAppBrowser amends the redirect url to lowercase. In this case the redirect url has ;token= appended to it. The below code replicates... > {code} > public secureDataLogin(): Promise { > return new Promise(function(resolve, reject) { > let csrf: string = uuid.v4(); > var url = 'http://111.111.11.111:8080/auth/oauth/2' + '?response_type=token&csrf=' + csrf + '&redirect_uri=' + 'http://www.google.com' + '&scope=profile&client_id=a1aaaaaa-123a-132a-1a11-ab12345678ab'; > var browserRef = window.cordova.InAppBrowser.open(url, "_blank", "location=no"); > browserRef.addEventListener("loadstart", (event) => { > if ((event.url).indexOf('http://www.google.com') === 0) { > browserRef.removeEventListener("exit", (event) => {}); > browserRef.close(); > > // would decode and process the token data here > console.log(event.url); > } > }); > browserRef.addEventListener("loaderror", (event) => { > console.log('*ERROR*' + event.type + ' - ' + event.message); > }); > browserRef.addEventListener("exit", function(event) { > console.log("Browser exit called"); > }); > }); > } > {code} > Cheers > Martin -- This message was sent by Atlassian JIRA (v6.4.14#64029) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org For additional commands, e-mail: issues-help@cordova.apache.org