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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 22c152396744bfdc8f5d14e14e67a12b14fe4028b3c2c8f47c4182f9e7283923
4
- data.tar.gz: 5871e8851226ae3df14e2d9525963eb95d6462d8fc71275067d5158e122aa2f1
3
+ metadata.gz: f29f8209a74236017c3e9c6a7119d26aa117da292f6bacf66c6a563f4ac8dd48
4
+ data.tar.gz: 296c5115987fa1c5bcf9ba75a4ef988ad8587cf7e3e8fad7567ccdc365d99c8d
5
5
  SHA512:
6
- metadata.gz: ee66f69bbd9efb97a99cf7b6211f3cd0558105a4f9da1d75c648459aa85cba7083a1ebea5f7e24a5b66116ffcb30cd983f7e007014526979a3ca40238421c666
7
- data.tar.gz: 18222546197048093572c967c7086215485785c24177ff85329746e91d85cc5d62e507b3ca38ebe235220de0731680f1eb7dc4c3ea4b30b409fa763c3f5669d4
6
+ metadata.gz: 3250acb4a4279c4e0bb4119cbff7e47f30368dcb72c4b46e8015a47811d2aba6252faad76e751f6ea58d68aa781cd25ad33b59e622f206fb48f59f8f114fbf31
7
+ data.tar.gz: b420399ef6866402af8780211393f242a931b9729f766c841293d86a2eb531a9c706e467d17cc7b06673d4cb8117fa6903cf2d98bf3a42e712b9c7154ac16d20
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 1.0.2
2
+
3
+ * Updated gem configuration
4
+
1
5
  # 1.0.1
2
6
 
3
7
  * Updated gem description
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,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)
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.1
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
@@ -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
@@ -1,5 +0,0 @@
1
- module OmniAuth
2
- module SlackOpenid
3
- VERSION = '1.0.1'
4
- end
5
- end