[ 
https://issues.apache.org/jira/browse/CB-14013?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16700749#comment-16700749
 ] 

ASF GitHub Bot commented on CB-14013:
-------------------------------------

boynet commented on issue #263: CB-14013: (android) Change the InAppBrowser to 
allow custom schemes for oAuth
URL: 
https://github.com/apache/cordova-plugin-inappbrowser/pull/263#issuecomment-442143355
 
 
   I started testing it and I ran into bug, the event only working on the first 
time so a page with this simple html loaded into inAppBrowser:
   ```
   config:
   <preference name="AllowedSchemes" value="whatsapp,twitter" />
   ....
   html:
   <html>
   <body>
   <a href="whatsapp://send?text=test">click to send</a>
   </body>
   </html>
   
   event:
           inAppBrowser.addEventListener('customscheme', function (event) {
               console.log(event);
           });
   ```
   
   the first click everything is fine, the second click no longer trigger the 
event

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> cordova-plugin-inappbrowser support for custom URL schemes, as needed for 
> oAuth
> -------------------------------------------------------------------------------
>
>                 Key: CB-14013
>                 URL: https://issues.apache.org/jira/browse/CB-14013
>             Project: Apache Cordova
>          Issue Type: New Feature
>          Components: cordova-plugin-inappbrowser
>    Affects Versions: [email protected]
>            Reporter: Steve Podell
>            Priority: Major
>   Original Estimate: 72h
>  Remaining Estimate: 72h
>
> A very common usage of the inappbrowser is to open a URL to the apps server, 
> as part of the oAuth flow.  After a secure token is created, the final step 
> in the oAuth flow is to redirect back to the Cordova app, to proceed as 
> authenticated.  At the WeVote open source project we use this to authenticate 
> with Twitter and Facebook, other projects want to authenticate with Google, 
> Whatsapp, Skype, etc. 
> There is a package for React Native react-native-oauth that does this, and I 
> was able to get oAuth working for iOS with 
> cordova-plugin-safariviewcontroller, but there is nothing that is stable, 
> maintained, and working that is equivalent for Android.
> A pull request will follow that uses whitelisted schemes to allow the oAuth 
> redirect to complete through the InAppBrowser.  It is a fairly simple code 
> change, that leads to a simple end user implementation, that should be widely 
> appreciated (based on years of mostly unfulfilled Stack Overflow chatter.)
>  
> This PR builds on  
> [https://github.com/apache/cordova-plugin-inappbrowser/pull/99] and 
> [https://github.com/apache/cordova-plugin-inappbrowser/pull/261] and builds 
> on a good suggestion from *[NGumby|https://github.com/NGumby]* and comments 
> about viability from *[infil00p|https://github.com/infil00p]*
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to