Omniauth Tumblr setup: Where can i find the setup credentials? - ruby-on-rails

I am using omniauth to register multiple user accounts from facebook, twitter and tumblr. I succesfully set up the connections to facebook and twitter, but i fail to connect to Tumblr.
The omniauth homepage on github tells me it does work with Tumblr, but does'nt supply me with any documentation on this provider.
I don't know what credentials i have to use for the initializers/omniauth file. I don't have any consumer keys/secret; Tumblr does not even supply these keys.
Ideas anyone?

It turns out Tumblr does have proper oauth 2 authentication. Strangely they managed to hide their application registration page. I couldn't find this page anywhere, not by googling 'Tumblr app registration' or anything. They don't even mention it in any of their api documentation (which I found pretty good on itself btw). It almost look like they do not even like 3rd party apps?
Eventually i found the registration page trough a php authentication tutorial. I will paste it here for future reference:
http://www.tumblr.com/oauth/register

Related

Rails backend for an iOS app, twitter sign in

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.

Sign in and sign up functionality using oauth

Hello I want to perform functionality like sign in or sign up with facebook using oauth2.
I have generated the consumer controller for oauth and could successfully consume the services provided by facebook.
But now I want to have functionality of sign in and signup.
Im getting a error with this.
My control comes to the def load_consumer but from there it is not going in to def callback2.
If the user is already signed in then it works perfectly fine else it crashes.
And also I wanted to know when to use oauth provider and when to use oauth consumer.
Please if you find a proper documentation for this then please post it here.
Thanks in adavnace.
There's a live example of how to implement Facebook Login via the Temboo SDK here. The source code for that example is available on GitHub (in PHP) but you can easily generate the Ruby code you need to achieve the same behavior via the Temboo website, see link below:
https://www.temboo.com/library/Library/Facebook/OAuth/
(Full disclosure: I work at Temboo, so let me know if you have any questions).

linking user accounts to their twitter/facebook/etc accounts

I have an existing rails app which uses 'devise' for authentication.
I would like user's to be able to link their twitter and facebook accounts to their account on my site, so that my application can post updates on their behalf.
Ideally:
When registering, you can choose to set up a standard account, or use twitter, Facebook, etc credentials.
If user chooses to use facebook credentials, I would still like them to be able to link their twitter account, so that my application can post to both at same time on their behalf.
A bonus would be allowing them to have identities which they could link twitter account A to one identity, then switch identities and use another twitter acccount.
My questions are:
if they use a standard account, and link facebook and twitter, are they going to be prompted to enter those credentials every time I post on their behalf? Or does omniauth give me an infinitely valid token?
I know devise can handle omniauth, but I can't seem to tell if it can handle what I am asking. It seems that it's omniauth support is more along the lines of just authenticating site users against twitter credentials not for linking multiples.
is there a rails gem that does this, and is well supported? I see socialite is no longer supported, but it seemed to be a one or the other type deal, not what I want anyway.
because I am already doing standard auth with devise, would it be simpler to just force users to create a standard account, and then use the twitter and facebook api's directly on top of that?
Looking for the best strategy here for doing what I want.
*note: If you think I can get 75% of what I want for 25% of the effort that all my goals would be, let me know. *
Thanks,
~S

Auth to twitter with login/password

I'm currently using OAuth to authenticate people with their twitter (twitter gems) acount in my application. The problem is that for people who aren't connected or who have various accounts.
So that's my question, is that possible, to ask user their login/password to link their twitter account on my application ?
Thanks
It is no longer possible to connect to Twitter's API using Twitter credentials. Twitter's public stance on this is that you should -never- provide your Twitter credentials to anyone else, ever. This is part of their rationale for implementing OAuth.
Even if you had the user's Twitter password, you couldn't validate that it was actually their password, nor could you access their Twitter account with it through the Twitter API.
Your best bet would be to look into devise and omniauth. I've gotten it to work this way. Omniauth also allows to link to several accounts. Be it, Facebook, Twitter, etc.
I'm sure it's entirely possible to ask users for their Twitter login/password on your application. It's a very bad practice though, as OAuth avoids the need for client applications to ever touch a users credentials. I suggest setting up an authentication/authorization system that maintains a login/password and then allows connecting multiple OAuth accounts via an AuthenticationStrategy model or the like. Ryan Bates did a few Railscasts on the subject:
http://railscasts.com/episodes/235-omniauth-part-1
http://railscasts.com/episodes/236-omniauth-part-2

Devise + Google Apps OAuth

I'm trying to add Google Apps authentication to my Rails (3) app using Devise (1.2.1). Thing is, I can't find anything that helpful on the interwebs other than the small mention in the devise wiki.
Question is, is this possible, and are there any examples out there I can check out?
Devise is to make your web application authenticate users. If you wanт users to login into your app with Google ID then look into OpenID. If you want to connect to Google services you need to implement Oauth client

Resources