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 +4 -4
- data/CHANGELOG.md +8 -0
- data/README.md +26 -4
- data/lib/omniauth/slack_openid.rb +6 -1
- data/omniauth-slack-openid.gemspec +2 -3
- metadata +5 -5
- data/lib/omniauth/slack_openid/version.rb +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f29f8209a74236017c3e9c6a7119d26aa117da292f6bacf66c6a563f4ac8dd48
|
4
|
+
data.tar.gz: 296c5115987fa1c5bcf9ba75a4ef988ad8587cf7e3e8fad7567ccdc365d99c8d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3250acb4a4279c4e0bb4119cbff7e47f30368dcb72c4b46e8015a47811d2aba6252faad76e751f6ea58d68aa781cd25ad33b59e622f206fb48f59f8f114fbf31
|
7
|
+
data.tar.gz: b420399ef6866402af8780211393f242a931b9729f766c841293d86a2eb531a9c706e467d17cc7b06673d4cb8117fa6903cf2d98bf3a42e712b9c7154ac16d20
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -1,8 +1,10 @@
|
|
1
|
-
#
|
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/
|
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
|
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/
|
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,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 =
|
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{
|
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.
|
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-
|
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:
|
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:
|
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
|