Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Regular Contributor
derekpapworth
Posts: 56
Registered: ‎06-30-2010
My Device: 9700

oauth - automating return to app?

Hi there,

 

Using oath to authenticate against web site (Dropbox in this case) in C++/Cascades app and all works well using modified versions of community examples etc., which include invoking the brower to authenticate and utilising the callback (using http://localhost:smileytongue:ort etc) to pass the token back to the app and then displaying message in the message saying to return to app to continue .. but ..

 

.. it'd be great to be able to rather than just displaying a message in the browser have it display a link/url that when they click on it it returns (invokes) to the app that opened the browser automatically .. or even better have the code invoke the app (sitting in the thumbnail background) automatically and close the browser window?

 

Anyone know of a way to do either of the above or any other suggestion for more automated way of returning to app once an authentication as taken place?

 

Thanks & regards,


Derek

Please use plain text.
New Developer
becker666
Posts: 136
Registered: ‎04-12-2010
My Device: Storm

Re: oauth - automating return to app?

Did u get around this???

 

  I did it on Android with webRequest and playing with the replies,

 

  Was about to do the same in the BB10 but looking at the doc it seems like Cascades has a framework integration to just use shared/Dropbox I've been fighting this ,  so far I managed to create a directory but  I'm unable to either write a file or copy a file

 

  Not clear if the BB stuff is working now (x.x.x1020) or still in the works????

Please use plain text.
Regular Contributor
derekpapworth
Posts: 56
Registered: ‎06-30-2010
My Device: 9700

Re: oauth - automating return to app?

Hi Becker666,

 

I did indeed get round it peforming all of the OAuth within the app itself rather than invoking the browser.

 

See the last post in this for bit more detail or let me know if you still need more

 

http://supportforums.blackberry.com/t5/Native-Development/blackberry-invoke-invoke-from-browser/m-p/...

 

Best regards,

Please use plain text.
New Developer
becker666
Posts: 136
Registered: ‎04-12-2010
My Device: Storm

Re: oauth - automating return to app?

[ Edited ]

Thanks Derek

 

I was trying to avoid the OAuth , and I even  wrote an article about it on code project

http://www.codeproject.com/Articles/385431/Android-RESTful-OAuth-upload-file-to-Dropbox

 

Since the shared/Dropbox in theory sounds  as simple as writing a doc to shared/documents, it seems like the paths have some funny stuff I cannot figure out or it is not fully implemented yet. May have to go the OAuth KISS way (although longer)

 

Update  It actually works!!! using the shared/Dropbox I just realized I had the sync up turned off and the copy was on my local dropbox list. The weird thing(maybe it is a feature) they do create a folder even if the sync up is turned off  ....So they take care of all of OAuth

Please use plain text.