omniauth-dropbox2 2.0.1 → 2.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 04676b895207720a6d857ce430158554de773436ffdf172ac2743a8329b059cb
4
- data.tar.gz: 62f816ee5385c21b945d2c99add28a61dde724cfb171ab66062d8641ea5b4416
3
+ metadata.gz: c2bf36577c5af12712f9664c3b95161c2a4f2f9abd2229891a8f1cad9d9d4562
4
+ data.tar.gz: 39ad7511a99bee6550d8b3fbdf7978befe45995d0787fc0bf37fb88f3de4ca42
5
5
  SHA512:
6
- metadata.gz: 9f4ff99da40c42baeebcad1f36c36333c6b1431a7e119131507b0eff31fd1ec2992fb212fb422cc28243188b3f6bff7326caa57ccda836e9c3be72faabeff327
7
- data.tar.gz: 9472344053ec88d0bbafc1f9260b39bd63aa99739e42185f52e7ef242168554e13f22b49c6f5bff68322f6cd4395b38ccddd9f6ecef48ec67e804c8398597078
6
+ metadata.gz: a23e3c45dd325c411b40472ea4d0aca49141666b4015826e058525fb433976e73a7b4229831b9411b72420119553f0890d09783a9da4b3c703cf997ec6b97919
7
+ data.tar.gz: 5fccc4f4492f360f4f8c8c68586c7a9b3e54401ec410069673a0325fd30bf4323ba6c36d83a1bcfb388f507bde9c88d4b59b8db13fc6f7d9fa58b405584f839c
data/README.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # OmniAuth Dropbox2 Strategy
2
2
 
3
+ [![Test](https://github.com/icoretech/omniauth-dropbox2/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/icoretech/omniauth-dropbox2/actions/workflows/test.yml?query=branch%3Amain)
4
+ [![Gem Version](https://img.shields.io/gem/v/omniauth-dropbox2.svg)](https://rubygems.org/gems/omniauth-dropbox2)
5
+
3
6
  `omniauth-dropbox2` provides a Dropbox OAuth2 strategy for OmniAuth.
4
7
 
5
8
  ## Installation
@@ -26,11 +29,50 @@ use OmniAuth::Builder do
26
29
  end
27
30
  ```
28
31
 
29
- Auth hash includes:
32
+ ## Auth Hash
33
+
34
+ Example payload from `request.env['omniauth.auth']` (real flow shape, anonymized):
35
+
36
+ ```json
37
+ {
38
+ "uid": "dbid:sample-account-id",
39
+ "info": {
40
+ "name": "Sample User"
41
+ },
42
+ "extra": {
43
+ "raw_info": {
44
+ "account_id": "dbid:sample-account-id",
45
+ "name": {
46
+ "given_name": "Sample",
47
+ "surname": "User",
48
+ "familiar_name": "Sample",
49
+ "display_name": "Sample User",
50
+ "abbreviated_name": "SU"
51
+ },
52
+ "email": "sample@example.test",
53
+ "email_verified": true,
54
+ "disabled": false,
55
+ "country": "IT",
56
+ "locale": "en",
57
+ "referral_link": "https://www.dropbox.com/referrals/AABsample",
58
+ "is_paired": false,
59
+ "account_type": {
60
+ ".tag": "basic"
61
+ },
62
+ "root_info": {
63
+ ".tag": "user",
64
+ "root_namespace_id": "123456",
65
+ "home_namespace_id": "123456"
66
+ }
67
+ }
68
+ }
69
+ }
70
+ ```
30
71
 
31
- - `uid`: Dropbox `account_id`
32
- - `info[:name]`: Dropbox display name
33
- - `extra['raw_info']`: full response from `users/get_current_account`
72
+ Notes:
73
+ - `uid` is mapped from `raw_info.account_id`
74
+ - `info.name` is mapped from `raw_info.name.display_name`
75
+ - `extra.raw_info` is the full `users/get_current_account` response
34
76
 
35
77
  ## Development
36
78
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module OmniAuth
4
4
  module Dropbox2
5
- VERSION = '2.0.1'
5
+ VERSION = '2.0.3'
6
6
  end
7
7
  end
@@ -35,7 +35,7 @@ module OmniAuth
35
35
  end
36
36
 
37
37
  def raw_info
38
- @raw_info ||= access_token.post('users/get_current_account', body: '{}').parsed
38
+ @raw_info ||= access_token.post('users/get_current_account', body: 'null').parsed
39
39
  end
40
40
 
41
41
  def callback_url
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-dropbox2
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Claudio Poli