You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+38-17Lines changed: 38 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,17 @@
1
1
# OmniAuth GitHub Enterprise Cloud with Data Residency
2
2
3
-
This is an OmniAuth strategy for authenticating with a [GitHub Enterprise Cloud with Data Residency](https://docs.github.com/en/enterprise-cloud@latest/admin/data-residency/about-github-enterprise-cloud-with-data-residency) host.
3
+
This is an OmniAuth strategy for authenticating with a [GitHub Enterprise Cloud with Data Residency][1] host.
4
4
5
-
It extends the [Official OmniAuth GitHub strategy](https://github.com/omniauth/omniauth-github/) in the following ways:
6
-
- Since this version of GitHub has strict tenant boundaries, therefore the configuration options require a `enterprise_subdomain` option
7
-
- While the official strategy has configuration options for either github.com or an [enterprise version](https://github.com/omniauth/omniauth-github/blob/master/README.md#github-enterprise-usage) (including a Data Residency version), this strategy allows for using the two strategies side by side
5
+
It extends the [Official OmniAuth GitHub strategy][2] in the following ways:
6
+
7
+
- Since this version of GitHub has strict tenant boundaries,
8
+
therefore the configuration options require a `enterprise_subdomain` option
9
+
- While the official strategy has configuration options for either github.com or an
10
+
[enterprise version][3] (including a Data Residency version),
11
+
this strategy allows for using the two strategies side by side
8
12
9
13
To use it, you'll need to sign up for an OAuth2 Application ID and Secret
10
-
on the [developer settings view](https://github.com/settings/developers) in GitHub.
You are required to pass an `enterprise_subdomain` inside an `enterprise_options` options hash to build the correct client URLs.
26
+
You are required to pass an `enterprise_subdomain` inside an `enterprise_options` options hash to build the correct client URLs.
23
27
24
-
For example, `enterprise_options: {enterprise_subdomain: "my-domain"}` will then expand to:
28
+
For example, `enterprise_options: {enterprise_subdomain: "my-domain"}` will then expand to:
25
29
26
30
```ruby
27
31
@@ -31,12 +35,13 @@ For example, `enterprise_options: {enterprise_subdomain: "my-domain"}` will then
31
35
32
36
```
33
37
34
-
The `enterprise_options` are initially set in the setup phase, and you can use hooks to update strategy options before the request and callback phases.
38
+
The `enterprise_options` are initially set in the setup phase,
39
+
and you can use hooks to update strategy options before the request and callback phases.
35
40
36
41
Static: you can set `enterprise_options` statically by adding to the options hash.
37
42
38
-
Dynamic: you can pass a proc (or another callable object) or a rack endpoint into the `setup` option. This is useful if you need to pull the subdomain from a request.
39
-
43
+
Dynamic: you can pass a proc (or another callable object) or a rack endpoint into the `setup` option.
44
+
This is useful if you need to pull the subdomain from a request.
40
45
41
46
### Basic Rails Usage with Devise
42
47
@@ -59,35 +64,39 @@ config.omniauth :github, ENV['GITHUB_CLIENT_ID'], ENV['GITHUB_CLIENT_SECRET'], s
You can use the [setup phase](https://github.com/omniauth/omniauth/wiki/Setup-Phase) to dynamically configure the `enterprise_subdomain` option for the request and callback phases.
67
+
You can use the [setup phase][5] to dynamically configure the `enterprise_subdomain` option for the request and callback phases.
63
68
64
69
## Development
65
70
66
71
### Setup
67
72
68
-
This project uses [mise](http://mise.jdx.dev/) to manage dependencies like the required Ruby version. The provided setup script uses mise by default to install Ruby before installing gems and other dependencies.
73
+
This project uses [mise][6] to manage dependencies like the required Ruby version.
74
+
The provided setup script uses mise by default to install Ruby before installing gems and other dependencies.
69
75
70
76
After checking out the repository, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests.
71
77
72
78
### Local installation
73
79
74
-
To install this gem onto your local machine, run `bundle exec rake install`.
80
+
To install this gem onto your local machine, run `bundle exec rake install`.
75
81
76
82
### Release
77
83
78
-
To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`. This command will create a git tag for the version, push git commits and the newly created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
84
+
To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`.
85
+
This command will create a git tag for the version, push git commits and the newly created tag, and push the `.gem` file to [rubygems.org][7].
79
86
80
87
### Documentation
81
88
82
-
You can check the documentation with [Vale](https://vale.sh/docs). For example, run `vale sync && vale --config=./.vale.ini README.md` to install styles and check the README file.
89
+
You can lint markdown with the following command: `bundle exec mdl *.md`. You can override styles in `md_styles.rb`. See [mdl_configuration][11] for more.
90
+
91
+
You can check the documentation content with [Vale][8]. For example, run `vale sync && vale --config=./.vale.ini README.md` to install styles and check the README file.
83
92
84
93
You can validate include links with this command: `lychee --no-progress --include-fragments --verbose *.md`
85
94
86
-
[Vale](https://vale.sh/) and [Lychee](https://lychee.cli.rs/) are optional and not included in the [mise.toml](./mise.toml) configuration file.
95
+
[Vale][9] and [Lychee][10] are optional and not included in the [mise.toml](./mise.toml) configuration file.
87
96
88
97
## Contributing
89
98
90
-
Bug reports and pull requests are welcome on GitHub at https://github.com/packfiles/omniauth-github-data-residency.
99
+
Bug reports and pull requests are welcome on GitHub at <https://github.com/packfiles/omniauth-github-data-residency>.
91
100
92
101
## License
93
102
@@ -96,3 +105,15 @@ The gem is available as open source under the terms of the [MIT License](https:/
96
105
---
97
106
98
107
Made with :heart: by [Packfiles :package:](https://packfiles.io)
0 commit comments