How to transfer credentials to Glass from Web - oauth-2.0

Since the "preview" of the GDK is out, I was wondering how we could transfer the credentials of OAuth (say from Twitter) from an AppEngine project (or anything else, open to suggestions) to the APK on Glass. I haven't seen anything on this, and since authentication on Glass would be very hard, how would we do this? I know that I could create a database, but I'm not sure how to make a lightweight version of that. Any other ideas besides a database would be welcome. Thank you for your help.

The easiest way is to have user login on a website, then save OAuth token into a QR code and let the user scan the QR code with Glass.
I have used it in my app Glasquare (Foursquare for Glass), it's all open-sourced:
https://github.com/destil/glasquare
EDIT: There is official way now: https://developers.google.com/glass/develop/gdk/authentication

Maybe you could login from the smartphone version of your app, and transfer those credentials to your glass generating a QR code and reading that QR first time you enter to your Glass app

The video that was published implied there was a authentication step during install but he also said that 'it was still beign worked out'
The bike app (Streva? May have the spelling wrong) does request some kind of authentication
I should add I'm pretty interested in how to deal with oauth in glass also

Related

AppAuth/OpenID-Connect: Login with username and password possible?

I want to implement login via OpenID-Connect in an iOS App. The AppAuth-SDK seems to be the standard way to do so. After downloading some examples I am a little bit confused. All AppAuth examples and tutorials are working with a WebView in which the user enters username and password. I want to make a native login screen where the user has to enter username and password. Is that even possible with AppAuth? I read something about "resource owner password grant" and "client secret". Is that what I need?
If somebody could push me in the right direction, I would be really thankful.
Think AppAuth-iOS to be a simple set of classes that helps you to build OAuth/OpenID Connect requests and receive responses. Their samples may contain ones which only use WebView with Authorization Code flow. But if you check docs, you can find their class APIs supporting for password grant.
You can build a OIDTokenRequest with related parameters. Here you can use build in grant type OIDGrantTypePassword from OIDGrantTypes. Simply feed in username password obtained from your login mechanism to OIDTokenRequest through additionalParameters. Create the request and obtain the response. I haven't tried this myself, but simply looking at the docs suggests this is the way to go.
Always think about supporting libraries as simple classes that were written to help you. That way things become simple to deal with.

Bug with Instagram API Login - This page could not be loaded

Since few days I have problems with the API instagram. Instagram sending this error page after the user has entered this login information.
"This page could not be loaded. If you have cookies disabled in your browser, or you are browsing in private mode"
Do you know why ? How to do ? Need help
On webapp authentication... the problem is related to instagram platform. I found that the problem arise only if your browser don't have the instagram cookie "ig_cb" set. This is set when you accept cookie policy on instagram.com. The workaround is to go on instagram and accept cookie policy then go back to your social auth and proceed.
This happens for both mobile and desktop users (browser).
Being a block on instagram login process... I guess there's no definitive solution other than wait for instagram bug fix.
I hate to be the bearer of bad news, but we also had this problem, which flagged on the Facebook Dev page: https://developers.facebook.com/support/bugs/406930029718049/
They have looked into the problem, as a number of us have had this exact issue too. It is only affecting EU user, as our US users are logging in and signing up without problems, and it seems that Facebook are refusing to look into it - their Instagram Platform API forum has already stopped accepting issues.
In terms of what we have learnt since last week, we think:
It is likely GDPR related
Not all apps have been affected, Bumble does not have this problem but Tinder does
It is happening with both the old Platform API and Graph API, according to a developer who has already migrated to Graph.
No one seems to know anything!
UPDATE:
So it seem's it is in fact a cookie issue on mobile. When a user goes to sign in on mobile view, the 'accept cookie' message that typically appears on web doesn't appear. However, when the error screen pops up, if you click 'Log in' in the top right, it will redirect you to the web view, which lets you accept the new terms and conditions. Then, once you direct back to mobile the cookie seems to have been saved and you can now login. This has worked for us on iOS so far, but not Android, and we still haven't come up with a work-around yet.
This bug has now been fixed.
Thank you all for your comments, individual input, and patience while we worked to address this issue for everyone.
I am happy to report that this particular issue with Instagram login should now be resolved, but if you are still seeing any issues related to this fix, please let us know on this report only.

Tencent Weibo API Web App ID

I'm trying to implement Tencent Weibo sharing on an iOS app. According to the Apple Docs you need to fill the Tencent Weibo Access Key when requesting permissions (ACTencentWeiboAppIdKeyin the options dictionary).
Can somebody guide me through the Tencent Weibo web to get an App ID for my app?
I would say that you would need to visit here to get the key, but the page just shows an empty background for me. Maybe the dev page doesn't work outside China? Can anybody over there check it out?
This answer looks relevant, but I'm not 100% sure it is talking about the same App Key.
Here's a useful step-by-step guide (in English) for registering for a API access:
http://www.cs.cmu.edu/~lingwang/weiboguide/
The process on Weibo's site is indeed in Chinese. The guide gives some guidance here.
One other suggestion would be to download the Chrome extension Zhongwen Chinese Popup Dictionary. If you don't know the meaning of a Chinese character this extension allows you to mouse over for a definition. Will help locate username, password field etc.
The step to get AppKey and AppSecret: here
The SDK about download website: here and Git URL. You can follow the example and just to change the AppKey, AppSecret, and share content.
The API document website: here
ShareSDK is also a good choice for you which have mentioned by #Allan.Chan
Maybe you can use sharesdk to do this click here

Twitter Oauth in windows phone 8 app

I need to use Twitter Oauth to login my windows phone app,
What i need exactly is
1)when the user click twitter log in button from my app, i need to show the twitter llog in page in a browser,
2)when he enters his credentials and accept the app, then i should get the user information like, name, gender, bday, what ever i can take.
That,s it, then i can close the browser and make my app active.
I just need to make the user to log in via twitter.
I referred lot of examples, that are all quit confusing and doing all the stuffs in twiiter.
I tried this example
and got this error
'TweetSharp.TwitterService' does not contain a definition fError 2 'TweetSharp.TwitterService' does not contain a definition for 'GetAccessToken' and no extension method 'GetAccessToken' accepting a first argument of type 'TweetSharp.TwitterService' could be found (are you missing a using directive or an assembly reference?)
and i tried enter link description here
failed on that too.
Can anybody help me to do the authentication via twitter for my app.
Thank you.
I tried this example and got success, I contacted the person who have posted that example and got help from him to solve the issues raised from this example.
Actually this Example works fine for twitter integration,
What you have to do is
1)Register your app in twitter, here the link for app registration,
log in and register your app.
2)Make sure you have given the Call Back URL(i forget to give that, and that makes me face lot of issues)
3)Note down the Consumer Key, Consumer Secret and Call back url(we need specify this 3 in our code)
4)Go to Settings, and set your app access to Read and Write
5)down load the above link and change the Consumer Key, Consumer Secret and Call back url as per your app, and then run the example, it will work fine.
Thank you.
If you just want to authenticate using Twitter and don't want to post anything, perhaps you can try Azure Mobile Service Authentication. You can find more information here: mobile services authentication

Facebook Connect for BlackBerry

I'm looking for a solution similar to the iPhone Facebook Connect (https://github.com/facebook/facebook-ios-sdk) for the BlackBerry platform. Basically, I need my users to authenticate against Facebook from within a native BlackBerry application (so, not a Web based mobile application). Is there a library I could use, and if not, what will be the correct approach to achieve this?
Thanks in advance!
Options for BlackBerry are:
Use Facebook Platform for Mobile
Use REST API approach provided by Eki Y. Baskoro
Try to port JavaFB from J2SE to J2ME
I managed to go through Facebook Connect authentication within my BB app. After cracking my head for three days I realised that it is the URL that is the culprit!
Basically these are what you need (assuming you are developing for 4.5 platform):
Using Browser Field, do a POST to http://m.facebook.com/login.php (the mobile version of Facebook) passing all the necessary arguments as per the Desktop application counterparts (one challenge is to get the signature generation correct).
Once the User successfully grants access, capture the URL of the success screen. You will obtain your auth_token.
Do a POST to the REST server to obtain the session key and secret given the auth_token you obtain.
Save the returned session key and secret, persist it, and wholla! your app is up and running.
I am developing a custom LoginScreen and FacebookFacade object to incorporate the first three steps above, if anyone is ever interested to reuse my code. It'll be GPLed, I suppose ;)
Afzal, I had a similar problem and I've found out that I actually had a problem with my connection string. You can look at the following link there is some explanation and code for creating the correct connection string
http://www.localytics.com/blog/post/how-to-reliably-establish-a-network-connection-on-any-blackberry-device/
and just add the connection string to the FetchThread where it opens the connection:
connection = (HttpConnection)Connector.open(absoluteUrl+getConnectionString());

Resources