omniauth-slack-openid 1.0.1 → 1.0.2
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 +4 -0
- data/README.md +20 -0
- data/lib/omniauth/slack_openid.rb +6 -1
- data/omniauth-slack-openid.gemspec +1 -2
- metadata +2 -3
- 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
@@ -28,6 +28,15 @@ gem 'omniauth-slack-openid'
|
|
28
28
|
|
29
29
|
## Usage with Devise
|
30
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
|
+
|
31
40
|
Add the following to your `config/initializers/devise.rb`:
|
32
41
|
|
33
42
|
```ruby
|
@@ -45,6 +54,17 @@ Add the following to your `config/initializers/devise.rb`:
|
|
45
54
|
|
46
55
|
In order to test the callback in development, try logging in and then manually update URL to use http instead of https.
|
47
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
|
+
|
48
68
|
## Contributing
|
49
69
|
|
50
70
|
Bug reports and pull requests are welcome on GitHub at https://github.com/amkisko/omniauth-slack-openid.rb
|
@@ -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)
|
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
|
@@ -107,7 +107,6 @@ files:
|
|
107
107
|
- README.md
|
108
108
|
- lib/omniauth-slack-openid.rb
|
109
109
|
- lib/omniauth/slack_openid.rb
|
110
|
-
- lib/omniauth/slack_openid/version.rb
|
111
110
|
- lib/omniauth/strategies/slack_openid.rb
|
112
111
|
- omniauth-slack-openid.gemspec
|
113
112
|
- spec/omniauth/strategies/slack_openid_spec.rb
|