omniauth-slack-openid 1.0.0 → 1.0.2

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
  SHA256:
3
- metadata.gz: f5fb3e5f96c832e24bbd7dc23c9e4ee0e1f8858a78beebdfdd7b0fe172c3a32e
4
- data.tar.gz: ec3f3ae44d759f1a40f34fe5e5a953b1bc120e9c9fd93678834c54f4c4d202ba
3
+ metadata.gz: f29f8209a74236017c3e9c6a7119d26aa117da292f6bacf66c6a563f4ac8dd48
4
+ data.tar.gz: 296c5115987fa1c5bcf9ba75a4ef988ad8587cf7e3e8fad7567ccdc365d99c8d
5
5
  SHA512:
6
- metadata.gz: 132b6519d589788e032f2994fb23663eb0765ec97efc11aa218ea98774aca4a1b6faa776ae4c492062876698ae3e6f3730d4bc3cfc8ecc6c2290719dc1defdbe
7
- data.tar.gz: a58d54b112c70ae11395f19a1fca400bee3a5f3ad9a22b2fef67f0b48e50f2f930a77e97e2b4d49bdc9b55d3d374255a1536667b60989e43b4400b5a6cdb11ee
6
+ metadata.gz: 3250acb4a4279c4e0bb4119cbff7e47f30368dcb72c4b46e8015a47811d2aba6252faad76e751f6ea58d68aa781cd25ad33b59e622f206fb48f59f8f114fbf31
7
+ data.tar.gz: b420399ef6866402af8780211393f242a931b9729f766c841293d86a2eb531a9c706e467d17cc7b06673d4cb8117fa6903cf2d98bf3a42e712b9c7154ac16d20
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ # 1.0.2
2
+
3
+ * Updated gem configuration
4
+
5
+ # 1.0.1
6
+
7
+ * Updated gem description
8
+
1
9
  # 1.0.0
2
10
 
3
11
  * Initial version
data/README.md CHANGED
@@ -1,8 +1,10 @@
1
- # omniauth_slack_openid.rb
1
+ # omniauth-slack-openid.rb
2
2
 
3
- [![Gem Version](https://badge.fury.io/rb/omniauth-slack-openid.svg)](https://badge.fury.io/rb/omniauth-slack-openid) [![Test Status](https://github.com/amkisko/omniauth_slack_openid.rb/actions/workflows/test.yml/badge.svg)](https://github.com/amkisko/omniauth_slack_openid.rb/actions/workflows/test.yml)
3
+ [![Gem Version](https://badge.fury.io/rb/omniauth-slack-openid.svg)](https://badge.fury.io/rb/omniauth-slack-openid) [![Test Status](https://github.com/amkisko/omniauth-slack-openid.rb/actions/workflows/test.yml/badge.svg)](https://github.com/amkisko/omniauth-slack-openid.rb/actions/workflows/test.yml)
4
4
 
5
- An OmniAuth strategy for Slack's OAuth2 API.
5
+ An OmniAuth strategy for implementing Sign-in with Slack using OpenID Connect.
6
+
7
+ Official documentation: https://api.slack.com/authentication/sign-in-with-slack
6
8
 
7
9
  Sponsored by [Kisko Labs](https://www.kiskolabs.com).
8
10
 
@@ -26,6 +28,15 @@ gem 'omniauth-slack-openid'
26
28
 
27
29
  ## Usage with Devise
28
30
 
31
+ Create Slack app and configure OAuth & Permissions to have the following Redirect URLs:
32
+ - https://localhost:3000/user/auth/slack_openid/callback
33
+
34
+ Copy `Client ID` and `Client Secret` to your environment (e.g. `.env.local` file):
35
+ ```sh
36
+ SLACK_CLIENT_ID=1234567890.1234567890
37
+ SLACK_CLIENT_SECRET=1234567890abcdef1234567890abcdef
38
+ ```
39
+
29
40
  Add the following to your `config/initializers/devise.rb`:
30
41
 
31
42
  ```ruby
@@ -43,9 +54,20 @@ Add the following to your `config/initializers/devise.rb`:
43
54
 
44
55
  In order to test the callback in development, try logging in and then manually update URL to use http instead of https.
45
56
 
57
+ ## Generating uid
58
+
59
+ Gem has own `generate_uid` method that concatenates `team_id` and `user_id`, you can use it with custom parameters:
60
+
61
+ ```ruby
62
+ def resolve_user_session(team_id, user_id)
63
+ uid = OmniAuth::Strategies::SlackOpenid.generate_uid(team_id, user_id)
64
+ UserSession.find_by(uid: uid, provider: "slack-openid")
65
+ end
66
+ ```
67
+
46
68
  ## Contributing
47
69
 
48
- Bug reports and pull requests are welcome on GitHub at https://github.com/amkisko/omniauth_slack_openid.rb
70
+ Bug reports and pull requests are welcome on GitHub at https://github.com/amkisko/omniauth-slack-openid.rb
49
71
 
50
72
  ## Publishing
51
73
 
@@ -1,2 +1,7 @@
1
- require 'omniauth/slack_openid/version'
2
1
  require 'omniauth/strategies/slack_openid'
2
+
3
+ module OmniAuth
4
+ module SlackOpenid
5
+ VERSION = '1.0.2'
6
+ end
7
+ end
@@ -1,9 +1,8 @@
1
1
  # -*- encoding: utf-8 -*-
2
- require File.expand_path('../lib/omniauth/slack_openid/version', __FILE__)
3
2
 
4
3
  Gem::Specification.new do |gem|
5
4
  gem.name = "omniauth-slack-openid"
6
- gem.version = OmniAuth::SlackOpenid::VERSION
5
+ gem.version = File.read(File.expand_path('../lib/omniauth/slack_openid.rb', __FILE__)).match(/VERSION\s*=\s*'(.*?)'/)[1]
7
6
 
8
7
  repository_url = "https://github.com/amkisko/omniauth-slack-openid.rb"
9
8
  root_files = %w(CHANGELOG.md LICENSE.md README.md)
@@ -16,7 +15,7 @@ Gem::Specification.new do |gem|
16
15
  gem.authors = ["Andrei Makarov"]
17
16
  gem.email = ["andrei@kiskolabs.com"]
18
17
  gem.homepage = repository_url
19
- gem.summary = %q{Slack OAuth2 strategy for OmniAuth}
18
+ gem.summary = %q{An OmniAuth strategy for implementing Sign-in with Slack using OpenID Connect}
20
19
  gem.description = gem.summary
21
20
  gem.metadata = {
22
21
  "homepage" => repository_url,
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-slack-openid
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrei Makarov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-08-28 00:00:00.000000000 Z
11
+ date: 2023-08-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omniauth
@@ -94,7 +94,8 @@ dependencies:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
96
  version: '3'
97
- description: Slack OAuth2 strategy for OmniAuth
97
+ description: An OmniAuth strategy for implementing Sign-in with Slack using OpenID
98
+ Connect
98
99
  email:
99
100
  - andrei@kiskolabs.com
100
101
  executables: []
@@ -106,7 +107,6 @@ files:
106
107
  - README.md
107
108
  - lib/omniauth-slack-openid.rb
108
109
  - lib/omniauth/slack_openid.rb
109
- - lib/omniauth/slack_openid/version.rb
110
110
  - lib/omniauth/strategies/slack_openid.rb
111
111
  - omniauth-slack-openid.gemspec
112
112
  - spec/omniauth/strategies/slack_openid_spec.rb
@@ -137,6 +137,6 @@ requirements: []
137
137
  rubygems_version: 3.4.19
138
138
  signing_key:
139
139
  specification_version: 4
140
- summary: Slack OAuth2 strategy for OmniAuth
140
+ summary: An OmniAuth strategy for implementing Sign-in with Slack using OpenID Connect
141
141
  test_files:
142
142
  - spec/omniauth/strategies/slack_openid_spec.rb
@@ -1,5 +0,0 @@
1
- module OmniAuth
2
- module SlackOpenid
3
- VERSION = '1.0.0'
4
- end
5
- end