omniauth-figma-oauth2 1.0.1 → 1.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 +4 -4
- data/CHANGELOG.md +14 -0
- data/README.md +13 -1
- data/lib/omniauth/strategies/figma.rb +8 -7
- data/lib/omniauth-figma/version.rb +1 -1
- data/omniauth-figma-oauth2-1.0.1.gem +0 -0
- data/omniauth-figma-oauth2-1.0.2.gem +0 -0
- metadata +5 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 48e85e87de36a28b05007695447c2b57308c758f575bf4bfa25e3ffd9b69511c
|
|
4
|
+
data.tar.gz: '09f9a3274c0c08a4170f0484f3ba49f3b4e8d9d43796de0243ab440ab770068d'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c5b16d4284f49cf07114e66ab8e4763c785ccad096c147c3ea45c42bb57a02c8ac6de6abfc95175957c91d8cdf648fb5f8e7217f4e9835e4675c2a8bc11a6be0
|
|
7
|
+
data.tar.gz: acfccf033a601b90db550ae854a65a76e3d96f37c6a238f324e9976548481765f5024b8bc5cc46edb7bb753584ea97796d7798a37cb85135dda13f93d94904dc
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
## [Unreleased]
|
|
2
2
|
|
|
3
|
+
## [1.0.3] - 2025-11-21
|
|
4
|
+
|
|
5
|
+
- Remove default scope from gem - scope must now be explicitly specified in app configuration
|
|
6
|
+
- Update to use current Figma API scopes (deprecated `figma:read` removed)
|
|
7
|
+
- Add documentation for scope configuration in README
|
|
8
|
+
|
|
9
|
+
## [1.0.2] - 2024-03-18
|
|
10
|
+
|
|
11
|
+
- Send OAuth credentials in the request header
|
|
12
|
+
|
|
13
|
+
## [1.0.1] - 2024-03-18
|
|
14
|
+
|
|
15
|
+
- Use the new API base URL structure to call Figma’s OAuth APIs: https://api.figma.com/v1/
|
|
16
|
+
|
|
3
17
|
## [1.0.0] - 2024-08-22
|
|
4
18
|
|
|
5
19
|
- Initial release
|
data/README.md
CHANGED
|
@@ -30,7 +30,19 @@ This is an example that you might put into a Rails initializer at `config/initia
|
|
|
30
30
|
|
|
31
31
|
```ruby
|
|
32
32
|
Rails.application.config.middleware.use OmniAuth::Builder do
|
|
33
|
-
provider :figma, ENV['CLIENT_ID'], ENV['CLIENT_SECRET']
|
|
33
|
+
provider :figma, ENV['CLIENT_ID'], ENV['CLIENT_SECRET'],
|
|
34
|
+
scope: 'file_content:read'
|
|
35
|
+
end
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
**Note:** You must specify the `scope` parameter with the permissions your app needs. Available scopes are documented in the [Figma REST API documentation](https://developers.figma.com/docs/rest-api/scopes/).
|
|
39
|
+
|
|
40
|
+
### Example with Multiple Scopes
|
|
41
|
+
|
|
42
|
+
```ruby
|
|
43
|
+
Rails.application.config.middleware.use OmniAuth::Builder do
|
|
44
|
+
provider :figma, ENV['CLIENT_ID'], ENV['CLIENT_SECRET'],
|
|
45
|
+
scope: 'current_user:read file_comments:read file_content:read file_metadata:read file_versions:read projects:read'
|
|
34
46
|
end
|
|
35
47
|
```
|
|
36
48
|
|
|
@@ -5,19 +5,17 @@ module OmniAuth
|
|
|
5
5
|
class Figma < OmniAuth::Strategies::OAuth2
|
|
6
6
|
|
|
7
7
|
option :name, 'figma'
|
|
8
|
-
option :scope, 'file_read'
|
|
9
|
-
|
|
10
8
|
option :client_options, {
|
|
11
|
-
site:
|
|
12
|
-
authorize_url:
|
|
13
|
-
token_url:
|
|
9
|
+
site: 'https://api.figma.com/v1/',
|
|
10
|
+
authorize_url: 'https://www.figma.com/oauth',
|
|
11
|
+
token_url: 'oauth/token',
|
|
12
|
+
auth_scheme: :basic_auth # Ensures credentials are sent in the Authorization header
|
|
14
13
|
}
|
|
15
14
|
|
|
16
|
-
option :token_options, [:client_id, :client_secret]
|
|
17
|
-
option :token_params, { parse: :json }
|
|
18
15
|
|
|
19
16
|
uid { raw_info['id'].to_s }
|
|
20
17
|
|
|
18
|
+
|
|
21
19
|
info do
|
|
22
20
|
{
|
|
23
21
|
:name => raw_info['handle'],
|
|
@@ -26,6 +24,7 @@ module OmniAuth
|
|
|
26
24
|
}
|
|
27
25
|
end
|
|
28
26
|
|
|
27
|
+
|
|
29
28
|
credentials do
|
|
30
29
|
{
|
|
31
30
|
:access_token => access_token.token,
|
|
@@ -35,10 +34,12 @@ module OmniAuth
|
|
|
35
34
|
}
|
|
36
35
|
end
|
|
37
36
|
|
|
37
|
+
|
|
38
38
|
def raw_info
|
|
39
39
|
@raw_info = access_token.get('https://api.figma.com/v1/me').parsed
|
|
40
40
|
end
|
|
41
41
|
|
|
42
|
+
|
|
42
43
|
def callback_url
|
|
43
44
|
full_host + script_name + callback_path
|
|
44
45
|
end
|
|
Binary file
|
|
Binary file
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: omniauth-figma-oauth2
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Philipp Riedel
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2025-
|
|
11
|
+
date: 2025-11-21 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: omniauth-oauth2
|
|
@@ -158,6 +158,8 @@ files:
|
|
|
158
158
|
- lib/omniauth-figma/version.rb
|
|
159
159
|
- lib/omniauth/strategies/figma.rb
|
|
160
160
|
- omniauth-figma-oauth2-1.0.0.gem
|
|
161
|
+
- omniauth-figma-oauth2-1.0.1.gem
|
|
162
|
+
- omniauth-figma-oauth2-1.0.2.gem
|
|
161
163
|
- omniauth-figma-oauth2.gemspec
|
|
162
164
|
homepage: https://github.com/phiele/omniauth-figma-oauth2
|
|
163
165
|
licenses:
|
|
@@ -178,7 +180,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
178
180
|
- !ruby/object:Gem::Version
|
|
179
181
|
version: '0'
|
|
180
182
|
requirements: []
|
|
181
|
-
rubygems_version: 3.4.
|
|
183
|
+
rubygems_version: 3.4.10
|
|
182
184
|
signing_key:
|
|
183
185
|
specification_version: 4
|
|
184
186
|
summary: Figma OAuth2 strategy for OmniAuth
|