Is it possible to do OAuth on WP8 without embeded browser? - windows-phone-8

This is for doing OAuth with the Pocket API, it specifically states that using an embedded webview is a violation of the terms of use, all OAuth examples I can find on WP8 seem to rely on the embedded webbrowser to do the authentication.
Is it not possible to use the default browser in WP8 to do the authentication and then redirect back into the App? I have done this in Android before. Thanks.

Well, if you read their documentation, it says that you need to provide a redirect URL. I am not sure if it will work, but you could try adding URI association to your application and specify callback URL that will return back to your app.
Then, when your application is reactivated from the default browser, you should know that the user has authorized it.
Thus you could use WebBrowserTask for that, but I am unaware if you can call local app-URI from browser.

Related

How can i define javascript API domain on linkedin for cordova app

Good afternoon, I am creating an application in Cordova and wanted to use linkedin, but when I run my application, it says I need to set my domain javascript API in my Application linkedin. I've tried with the domain "file: ///" but gives the same error.
Does anyone have an idea or a solution to this problem?
Best Regards
LinkedIn (or any OAuth provider) requires your Web domain for security purposes (to know the right URL for authentication callbacks, and to help prevent random sites from trying to impersonate your application).
You must supply a domain such as www.yourdomainname.com or even your external IPv4 address will work, such as 55.55.12.12.

Activate chrome app from web page?

I am building a packaged chrome app (It is needed as I want to access chrome.socket). I have a website from which I would like to call my app (if installed or ask the user to install it) by clicking a link. Is this possible ? Not able to find any easy way for this workflow.
The url_handlers might be the best way to achieve this.
You can also use the externally_connectable manifest property to declare that your website can connect to your app, then call chrome.runtime.sendMessage or chrome.runtime.connect from your webpage and handle it in an chrome.runtime.onMessage handler in the app.
Which one is better suited depends on your needs. The url_handlers is an easier way, but it will permanently assign the URL on your link to your app, so you won't be able to use it for anything else if the app is installed. The externally_connectable is a harder way, but it enables a much more elaborate bidirectional communication between your website and the app.
You can even use a combination of the two approaches, if you need: launch the app using the url_handlers feature, then establish a communication channel back to the website once the app is up and running.
Apps can now (as of Chrome 31 I believe) register to handle urls by adding url_handlers in their manifest and detecting the url causing the app to launch in the chrome.app.runtime.onLaunched event. If the app doesn't launch, your hosted web site will be loaded an can present an inline installation with chrome.webstore.install.

Upload Video to Facebook from AIR app

Developing an AIR based app that captures video. The user will then be able to upload to facebook if they so choose.
Right now I am confused about the requirements in uploading videos to facebook.
Even though this is technically NOT a facebook application, will I need to create a Facebook application ID?
Will I also need to make use of the facebook-actionscript SDK?
I've read elsewhere that the API needs to launch the Facebook login within a web view.
Or are there alternatives in my case?
Even though this is technically NOT a facebook application, will I need to create a Facebook application ID?
Yes.
Will I also need to make use of the facebook-actionscript SDK? Or are there alternatives in my case?
Talking to the API works over HTTP – so you can use any technique that allows you to make HTTP requests.
But using a framework/SDK that already has methods for usual FB API stuff will be much simpler, than handling all that HTTP stuff yourself.

Authenticating the application in embedded systems - Google Drive SDK

Is there any way to authenticate the application to use the Google Drive API without a native browser in an embedded system?
I'm looking for a solution to the user accepts and put your password and username using the OAuth2.0 without browser interactions... Is it possible?
My applications is build in Java Code.
Thanks in advance.
I am presently trying to do just this and I don't think it is possible because:
To authenticate in embedded device you need to use this process:
https://developers.google.com/accounts/docs/OAuth2ForDevices
the problem with this, is that it only accept limited range of scopes like:
--https://www.googleapis.com/auth/userinfo.profile
which works OK
but when you try with scope like:
--https://www.googleapis.com/auth/drive.*
you get invalid_scope.
If you find a solution please let me know, I have the same problem my device is embedded, has no screen, and is not available with remote desktop of the like.
thanks for any feed back.
Use the OAuth 2 device flow which is designed for cases where a browser isn't available on the device. It allows the user to complete the login & authorization on a separate, more capable device (phone/tablet/laptop) where a browser is available.

PhoneGap index page

i know that the index.html page (the PhoneGap startup page) needs to reside on the device. but if we want to create an app who uses third party user authentication before proceeding to core application, so then what we have to do?
Thanks in advance
On android you can change the starting page in the main activity or you can make a redirect in index.html
Well, you don't say if you are platform specific..
And there are lots of third party auth options..
But I can offer two solutions (admittedly my own code etc),
both of them use PhoneGap for Android and PhoneGap Plugins. The key piece of code for me has been the onLocationChange callback feature of the ChildBrowser plugin. Your app can take the user to other sites for auth or whatever, but still get control back.
Tutorial on Using Twitter REST API (OAuth 1, ChildBrowser, jsOAuth plugin)
Free Android App + Source on github : AppLaud App (OpenID, ChildBrowser, custom server)
For authentication, you can have a form in your index.html (maybe under login div) to do a post to an actual webserver.
Then, fetch the data returned from the webserver to let your user access the functionality of your native phonegap application.
You can have the functionality disabled until you receive the successful login from the webserver. If you post via ajax, the webview won't even blink, but you will still get the successful login response from webserver and simply enable functionality on your app after this.
Let me know if this is confusing and I'll try to explain more clearly and
I hope this helps.