omniauth-bike-index 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f1c9a5e41e30b52036f65770a0890439ad29b4fe
4
- data.tar.gz: 0e557a7f410e21be8f3cabea92ac204acfa3737b
3
+ metadata.gz: 4904847b367892ffa7711c26f0ec6d6df8fd25d3
4
+ data.tar.gz: 96c8d478c2e4845b5223a0756f27ff6cd051edcb
5
5
  SHA512:
6
- metadata.gz: e83173b9ff0486ff302aef7069ef7314658e1dd94b2c7ca24954eb25ad5ca01d84d84813abc0c9f042bca123fccc80266b81b8c537a477ed1f53b68dea13400d
7
- data.tar.gz: 0fa877dfc49dee02e22b4fa77b4d55c1c9b6c70d3c7d71125628d6fc8cc97118f5ce6b76e5aeaa5f1f00fad96f4e6aa0522b78ae058789214f5b77f558af4964
6
+ metadata.gz: 7d6395ff98fdb48179672b1f425619952859bc96b2fff388cf22e668431aafe9e8a63a5de320061cc7676505d0afd4f4878bc470fc7d699e8c6ec4c5b4ddab54
7
+ data.tar.gz: ad745ff6b887f1d01fbdffc4f3822c5fcc18c74b44b4c3a3c6c36d10dfaae9aeb507bbe679b2dfabbd6e257c0aba2c0bfdce981f6ff7f2573520494aed973be8
data/README.md CHANGED
@@ -1,11 +1,9 @@
1
1
  # OmniAuth::BikeIndex [![Build Status](https://travis-ci.org/bikeindex/omniauth-bike-index.svg?branch=master)](https://travis-ci.org/bikeindex/omniauth-bike-index)
2
- ==============
3
2
 
4
3
  Bike Index OAuth2 Strategy for OmniAuth 1.0.
5
4
 
6
5
  Supports the OAuth 2.0 server-side and client-side flows.
7
6
 
8
-
9
7
  ## Creating an application
10
8
 
11
9
  To be able to use OAuth on the Bike Index, you have to create an application. Go to [BikeIndex.org/oauth/applications](https://bikeindex.org/oauth/applications) to add your application.
@@ -14,7 +12,6 @@ Once you've added your application and your routes, you'll be able to see your A
14
12
 
15
13
  **Note**: Callback url has to be an exact match - if your url is `http://localhost:3001/users/auth/bike_index/callback` you _must_ enter that exactly - `http://localhost:3001/users/auth/` will not work.
16
14
 
17
-
18
15
  Check out the **[Bike Index API Documentation](https://bikeindex.org/documentation)** to see what can be done with authenticated users.
19
16
 
20
17
  ## Usage
@@ -62,7 +59,6 @@ end
62
59
 
63
60
  Available scopes: `read_user`, `write_user`, `read_bikes`, `write_bikes`
64
61
 
65
-
66
62
  ## Credentials
67
63
 
68
64
  If you don't include a scope, the response will include a `uid` from Bike Index for the user and nothing else.
@@ -71,11 +67,9 @@ If you include the `read_bikes` scope, the response will include an array of the
71
67
 
72
68
  You can use these IDs to access information about the bikes - e.g. [api/v3/bikes/3414](https://bikeindex.org/api/v3/bikes/3414) & [api/v3/bikes/29367](https://bikeindex.org/api/v3/bikes/29367)
73
69
 
74
- If you include the `read_user` scope, the response will include the user's nickname, email and name. You will also see their twitter handle and avatar if they have added them. The keys for these items -
70
+ If you include the `read_user` scope, the response will include the user's nickname, email and name. You will also see their twitter handle and avatar if they have added them. The keys for these items -
75
71
  `nickname`, `email`, `name`, `twitter` & `image` - all accessible in the `request.env['omniauth.auth']`, e.g. `request.env['omniauth.auth'].info.email`
76
72
 
77
-
78
73
  ## Auth Hash
79
74
 
80
75
  You can also see the authetication hash (in JSON format) by going to the authentication url on the Bike Index with the user's access token - `https://bikeindex.org/api/v3/me?access_token=<OAUTH_ACCESS_TOKEN>`
81
-
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module BikeIndex
3
- VERSION = '1.0.0'
3
+ VERSION = '1.0.1'
4
4
  end
5
5
  end
@@ -35,7 +35,12 @@ module OmniAuth
35
35
  super
36
36
  end
37
37
 
38
- private
38
+ # https://github.com/omniauth/omniauth-oauth2/issues/81
39
+ def callback_url
40
+ full_host + script_name + callback_path
41
+ end
42
+
43
+ private
39
44
 
40
45
  def prune!(hash)
41
46
  hash.delete_if do |_, value|
@@ -43,7 +48,6 @@ module OmniAuth
43
48
  value.nil? || (value.respond_to?(:empty?) && value.empty?)
44
49
  end
45
50
  end
46
-
47
51
  end
48
52
  end
49
53
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-bike-index
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Seth Herr
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-10-13 00:00:00.000000000 Z
11
+ date: 2018-09-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omniauth