We are using Jawbone API to pull data tracked using jawbone devices.
Our users are successfully able to sign in when they access Jawbone sign in page during OAuth process from our website.
However, they are not able to sign in when they access jawbone authentication page from our android app during OAuth process. This authentication page is launched in webview on andriod.
On log in page after entering correct credentials and clicking on Sign In button does nothing. The page even does not display whether credentials were correct or not.
Is the OAuth authentication user agent (web/app) dependent?
We have started facing this issue just recently and before it used to work perfectly.
Jawbone's OAuth2 flow operates through web login and approval pages, then issues a redirect callback to your server. Jawbone has several partners who do this within their Android apps.
It sounds like your app is not handling the callback half of the OAuth2 flow correctly, but it's hard to say based on this description.
Have you reviewed the Authentication documentation?
Also, consider Jawbone's Android SDK.
Related
On the web project, I added the ability to authenticate using the Twitter API. And I got a problem. I will describe the steps to reproduce the problem:
I authenticated in my web application using my Twitter account - “Account 1”
I have logged out in my web application.
I’m trying to login to my web application using “Account 2” Twitter. But Twitter does not allow me to do this, offering to sign in with “Account 1”.
Also, during the first authentication in my web application, I actually log into my Twitter account (when I go to twitter site, I get into the account from which I previously authenticated in the web application).
I think this is not normal. I only need authentication in my web app, not logging into my account (on twitter site).
How can I get the right behavior?
I am using the Gmail API in iOS with the code that is given on the link
https://developers.google.com/gmail/api/quickstart/ios?ver=swift
and I tried running the application on an iPhone but every time, when I start the application it is asking for a Google login for authorization.
The page at Google Developers says that:
Authorization information is stored in your Keychain, so subsequent executions will not prompt for authorization.
So my question is that for my application is the Keychain value not being stored, if so how can I correct it and if not what can be the possible error in the code that is in the link provided above?
I'm using omniauth-twitter for twitter log in to the website and it works perfectly well (go to /auth/twitter, user authenticates, and then redirect_to /auth/twitter/callback). Great.
However, on the iOS side, how can I implement sign in with twitter? Do I do it client side or server side? Could anybody go through the steps? (note: the only way to sign in to the app is through twitter)
We've tried:
using a UIWebView that goes to /auth/twitter, but on redirect, it goes back to the web version. Is there a way to get JSON data from the UIWebView?
doing sign in with twitter client side, and using a made up password to authenticate in sessions#create that matches a made up password on the db.
Is there another alternative for authentication? I know what we're doing has a lot of flaws but we couldn't find any other solutions even after asking in meetups and researching online for days. please help!
You could add an OAuth 2
implementation on your server. Your server authorizes the iOS app for an authenticated user / content owner. (You have completed the authentication part.) Once authorized, the iOS app accesses that particular user's content (via an api on your server) as if it is logged in as that user.
You will find one potential OAuth 2 provider implementation for RoR as
applicake/doorkeeper
You will find a sample iOS client application as
telegraphy-interactive/OAuthClientSetup
That is one suggestion, in any case. Not the whole answer, which would require a book chapter.
I have developed a PHP website where users authenticate via Facebook and I get and store their auth_token.
On the other side, I have started developing an iOS app where users will be able to authenticate via Facebook too. The auth_token, as you know, will be different from the one that I got in the website auth process (same Facebook app as in the website)
My question is: can I use the auth_token that I got in the iOS app to make requests from the website? (same user, same app)
The reason is that sometimes I want some actions to be performed from the mobile device (ie. update status) while others to be performed from the web server (ie. checking which friends of the current user are already registered in my website)
thanks
Essentially, as long as you have a valid access_token for the specific user you can use it anywhere you want. Anywhere that you can execute an http request to Facebook and provide the correct parameters, you'll be able to make API calls on behalf of the user.
https://graph.facebook.com/USER_ID?access_token=XXX
This call should work regardless of where you execute it from.
I am using ShareKit to allow the user of an iPad application to Tweet a URL from within the application through their Twitter account. The following OAuth steps work fine:
ShareKit uses the Consumer Key and Consumer Secret hard-coded in the app to request the URL to load in a WebView.
The URL provided by Twitter displays correctly in the WebView.
The user is prompted to grant Read and Write permissions by logging into their Twitter account using the WebView.
The WebView shows a redirecting page briefly while it redirects to the callback URL.
At this stage in the OAuth flow things go wrong.
After the WebView displays a Twitter 'redirecting' message very briefly, a page saying 'Your session has timed out' is displayed.
I decided to create a Twitter application in my own personal Twitter account. When I change the app to use my own Consumer Key and Consumer Secret (but keeping the callback URL and permissions the same), everything works fine.
I have cross checked the Consumer Key and Secret with the values in the app and they match (for the Twitter account that failed).
I used Twurl and everything worked fine with both Twitter accounts. So I don't understand what could be wrong with only one of the Twitter accounts and only when using ShareKit.
I could do with some direction on how to track down the problem?
I can not help you directly but original share kit is obsolete in many ways. You might want to try ShareKit 2.0. At least, on ios5+ it uses Twitter.framework, so your problems might be gone.