omniauth-epicgames 0.1.0

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: cd6eddc63e1dfa39fb2ac3f50653b7f82f092da1978f5be5829c0e855571f0b1
4
+ data.tar.gz: 2b3a6b28b40a45bca582e8e6a9a4ea9fba586174d7386c34ce1ae50d5a869bf8
5
+ SHA512:
6
+ metadata.gz: d5191d351ce632c2e324a2587bbe1af1591640d076f39534b634b25a9795d5b46057391a312646d06d34edc971ea3cd29a1d3de32c4410e99599b9b7b6456374
7
+ data.tar.gz: b5e3c67e3e907673c62a0bbc36e3df402ab68090c9392b94b3a6000e0bbe0cac8f436034f6b65fc686f874ee5a98b02322221ed3ed7b0b06a9c19c66d2392311
data/README.md ADDED
@@ -0,0 +1,50 @@
1
+ # OmniAuth EpicGames
2
+
3
+ This is an OmniAuth strategy for authenticating to Epic Games OAuth
4
+ service. In order to use it you need to register an application at the
5
+ [Epic Games Developer Portal](https://dev.epicgames.com)
6
+
7
+
8
+ ## Installation
9
+
10
+ Add this line to your application's Gemfile:
11
+
12
+ ```ruby
13
+ gem 'omniauth-epicgames'
14
+ ```
15
+
16
+ And then execute:
17
+
18
+ ```
19
+ $ bundle install
20
+ ```
21
+
22
+ ## Usage
23
+
24
+ Here's a quick example, adding the middleware to a Rails app in `config/initializers/omniauth.rb`:
25
+
26
+ ```ruby
27
+ Rails.application.config.middleware.use OmniAuth::Builder do
28
+ provider :epic_games,
29
+ ENV['EGS_CLIENT_KEY'],
30
+ ENV['EGS_CLIENT_SECRET'],
31
+ { scope: ['basic_profile'].join(' ') }
32
+ end
33
+ ```
34
+
35
+ ## Contributing
36
+
37
+ Bug reports and pull requests are welcome on GitHub at https://github.com/trophieshunter/omniauth-epicgames.
38
+
39
+ ## License
40
+
41
+ [The MIT License](http://opensource.org/licenses/MIT)
42
+
43
+ ## About
44
+
45
+ This repo is build and maintained by <a href="https://trophieshunter.com/">trophieshunter.com</a>
46
+
47
+ <a href="https://trophieshunter.com/">
48
+ <img src="https://cdn.trophieshunter.com/logo-dark.webp" alt="Sponsored by trophieshunter.com" width="160" height="51">
49
+ </a>
50
+
data/Rakefile ADDED
@@ -0,0 +1,3 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
@@ -0,0 +1,39 @@
1
+ require "omniauth-oauth2"
2
+
3
+ module OmniAuth
4
+ module Strategies
5
+ class EpicGames < OmniAuth::Strategies::OAuth2
6
+ option :name, "epic_games"
7
+
8
+ option :client_options, {
9
+ site: "https://api.epicgames.dev/epic",
10
+ authorize_url: "https://www.epicgames.com/id/authorize",
11
+ token_url: "https://api.epicgames.dev/epic/oauth/v2/token"
12
+ }
13
+
14
+ def request_phase
15
+ super
16
+ end
17
+
18
+ def callback_phase
19
+ super
20
+ end
21
+
22
+ uid { raw_info["account_id"].to_s }
23
+
24
+ info do
25
+ {
26
+ account_id: raw_info["account_id"],
27
+ }
28
+ end
29
+
30
+ extra do
31
+ { raw_info: raw_info }
32
+ end
33
+
34
+ def raw_info
35
+ access_token
36
+ end
37
+ end
38
+ end
39
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ module OmniAuth
4
+ module EpicGames
5
+ VERSION = "0.1.0"
6
+ end
7
+ end
@@ -0,0 +1,2 @@
1
+ require "omniauth-epicgames/version"
2
+ require "omniauth/strategies/epic_games"
metadata ADDED
@@ -0,0 +1,78 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: omniauth-epicgames
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - trophieshunter.com
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2024-11-05 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: omniauth
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '2.0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '2.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: omniauth-oauth2
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.1'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.1'
41
+ description: Omniauth Strategy for Epic Games OAuth Login.
42
+ email:
43
+ - support@trophieshunter.com
44
+ executables: []
45
+ extensions: []
46
+ extra_rdoc_files: []
47
+ files:
48
+ - README.md
49
+ - Rakefile
50
+ - lib/omniauth-epicgames.rb
51
+ - lib/omniauth-epicgames/version.rb
52
+ - lib/omniauth/strategies/epic_games.rb
53
+ homepage: https://github.com/trophieshunter/omniauth-epicgames
54
+ licenses: []
55
+ metadata:
56
+ allowed_push_host: https://rubygems.org
57
+ homepage_uri: https://github.com/trophieshunter/omniauth-epicgames
58
+ source_code_uri: https://github.com/trophieshunter/omniauth-epicgames
59
+ post_install_message:
60
+ rdoc_options: []
61
+ require_paths:
62
+ - lib
63
+ required_ruby_version: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - ">="
66
+ - !ruby/object:Gem::Version
67
+ version: 3.0.0
68
+ required_rubygems_version: !ruby/object:Gem::Requirement
69
+ requirements:
70
+ - - ">="
71
+ - !ruby/object:Gem::Version
72
+ version: '0'
73
+ requirements: []
74
+ rubygems_version: 3.5.6
75
+ signing_key:
76
+ specification_version: 4
77
+ summary: Omniauth Strategy for Epic Games.
78
+ test_files: []