diff --git a/.travis.yml b/.travis.yml index d7f431d..ebfa48e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,9 +2,10 @@ rvm: - 2.1.10 - - 2.2.6 - - 2.3.3 - - 2.4.0 + - 2.2.9 + - 2.3.6 + - 2.4.3 + - 2.5.0 - jruby-1.7.26 - rbx-3 diff --git a/README.md b/README.md index 04a38ef..66015b4 100644 --- a/README.md +++ b/README.md @@ -6,13 +6,13 @@ This gem contains the Twitter strategy for OmniAuth. -Twitter offers a few different methods of integration. This strategy implements the browser variant of the "[Sign in with Twitter](https://dev.twitter.com/docs/auth/implementing-sign-twitter)" flow. +Twitter offers a few different methods of integration. This strategy implements the browser variant of the "[Sign in with Twitter](https://dev.twitter.com/web/sign-in/implementing)" flow. Twitter uses OAuth 1.0a. Twitter's developer area contains ample documentation on how it implements this, so check that out if you are really interested in the details. ## Before You Begin -You should have already installed OmniAuth into your app; if not, read the [OmniAuth README](https://github.com/intridea/omniauth) to get started. +You should have already installed OmniAuth into your app; if not, read the [OmniAuth README](https://github.com/omniauth/omniauth) to get started. Now sign in into the [Twitter developer area](https://dev.twitter.com/apps) and create an application. Take note of your API Key and API Secret (not the Access Token and Access Token Secret) because that is what your web application will use to authenticate against the Twitter API. Make sure to set a callback URL or else you may get authentication errors. (It doesn't matter what it is, just that it is set.) @@ -42,7 +42,7 @@ ## Authentication Options -Twitter supports a [few options](https://dev.twitter.com/docs/api/1/get/oauth/authenticate) when authenticating. Usually you would specify these options as query parameters to the Twitter API authentication url (`https://api.twitter.com/oauth/authenticate` by default). With OmniAuth, of course, you use `http://yourapp.com/auth/twitter` instead. Because of this, this OmniAuth provider will pick up the query parameters you pass to the `/auth/twitter` URL and re-use them when making the call to the Twitter API. +Twitter supports a [few options](https://dev.twitter.com/docs/api/1/get/oauth/authenticate) when authenticating. Usually you would specify these options as query parameters to the Twitter API authentication URL (`https://api.twitter.com/oauth/authenticate` by default). With OmniAuth, of course, you use `http://yourapp.com/auth/twitter` instead. Because of this, this OmniAuth provider will pick up the query parameters you pass to the `/auth/twitter` URL and re-use them when making the call to the Twitter API. The options are: @@ -52,15 +52,15 @@ * **lang** - The language used in the Twitter prompt. This is useful for adding i18n support since the language of the prompt can be dynamically set for each user. *Example:* `http://yoursite.com/auth/twitter?lang=pt` -* **secure_image_url** - Set to `true` to use https for the user's image url. Default is `false`. +* **secure_image_url** - Set to `true` to use https for the user's image URL. Default is `false`. * **image_size**: This option defines the size of the user's image. Valid options include `mini` (24x24), `normal` (48x48), `bigger` (73x73) and `original` (the size of the image originally uploaded). Default is `normal`. -* **x_auth_access_type** - This option (described [here](https://dev.twitter.com/docs/api/1/post/oauth/request_token)) lets you request the level of access that your app will have to the Twitter account in question. *Example:* `http://yoursite.com/auth/twitter?x_auth_access_type=read` +* **x_auth_access_type** - This option (described [here](https://developer.twitter.com/en/docs/basics/authentication/api-reference/request_token)) lets you request the level of access that your app will have to the Twitter account in question. *Example:* `http://yoursite.com/auth/twitter?x_auth_access_type=read` -* **use_authorize** - There are actually two URLs you can use against the Twitter API. As mentioned, the default is `https://api.twitter.com/oauth/authenticate`, but you also have `https://api.twitter.com/oauth/authorize`. Passing this option as `true` will use the second URL rather than the first. What's the difference? As described [here](https://dev.twitter.com/docs/api/1/get/oauth/authenticate), with `authenticate`, if your user has already granted permission to your application, Twitter will redirect straight back to your application, whereas `authorize` forces the user to go through the "grant permission" screen again. For certain use cases this may be necessary. *Example:* `http://yoursite.com/auth/twitter?use_authorize=true`. *Note:* You must have "Allow this application to be used to Sign in with Twitter" checked in [your application's settings](https://dev.twitter.com/apps) - without it your user will be asked to authorize your application each time they log in. +* **use_authorize** - There are actually two URLs you can use against the Twitter API. As mentioned, the default is `https://api.twitter.com/oauth/authenticate`, but you also have `https://api.twitter.com/oauth/authorize`. Passing this option as `true` will use the second URL rather than the first. What's the difference? As described [here](https://developer.twitter.com/en/docs/basics/authentication/api-reference), with `authenticate`, if your user has already granted permission to your application, Twitter will redirect straight back to your application, whereas `authorize` forces the user to go through the "grant permission" screen again. For certain use cases this may be necessary. *Example:* `http://yoursite.com/auth/twitter?use_authorize=true`. *Note:* You must have "Allow this application to be used to Sign in with Twitter" checked in [your application's settings](https://dev.twitter.com/apps) - without it your user will be asked to authorize your application each time they log in. -Here's an example of a possible configuration where the the user's original profile picture is returned over https, the user is always prompted to sign-in and the default language of the Twitter prompt is changed: +Here's an example of a possible configuration where the user's original profile picture is returned over https, the user is always prompted to sign-in and the default language of the Twitter prompt is changed: ```ruby Rails.application.config.middleware.use OmniAuth::Builder do diff --git a/debian/changelog b/debian/changelog index 65cdce6..bf4fcf5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -ruby-omniauth-twitter (1.4.0-2) UNRELEASED; urgency=medium +ruby-omniauth-twitter (1.4.0+git20200717.1.41c7be0-1) UNRELEASED; urgency=medium [ Utkarsh Gupta ] * Add salsa-ci.yml @@ -19,8 +19,9 @@ + ruby-omniauth-twitter: Drop versioned constraint on ruby-omniauth-oauth in Depends. * Bump debhelper from old 12 to 13. + * New upstream snapshot. - -- Utkarsh Gupta Tue, 13 Aug 2019 06:18:04 +0530 + -- Utkarsh Gupta Sat, 25 Sep 2021 18:44:57 -0000 ruby-omniauth-twitter (1.4.0-1) unstable; urgency=medium