Skip to content

Commit

Permalink
Adding support for a different domain than GitHub.com (#110)
Browse files Browse the repository at this point in the history
* Update package.json

* Add REACT_APP_GITHUB_DOMAIN
  • Loading branch information
PseudoCoding committed Dec 8, 2020
1 parent 2585a0c commit 10f58be
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ React and Apollo dev tools will be available inside the Chrome dev tools.

Pullp uses an external auth server to complete Github sign in and receive a token for the Github API. You may want to host a local version of this server. Clone it from https://github.com/rkclark/pullp-oauth-gatekeeper, run it on the port of your choosing and then add the server URL to `REACT_APP_OAUTH_GATEKEEPER_URL` in the `/env/.env.development` file inside of Pullp.

If you are connecting to a different GitHub domain than `github.com`, you can set `REACT_APP_GITHUB_DOMAIN` to that domain such as `github.mycompany.com`

Your oauth server will need set of Github oAuth app credentials. To make these:

* In Github, go to your settings
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pullp",
"version": "3.0.0",
"version": "3.0.1",
"private": false,
"main": "public/electron-starter.js",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion public/electron-starter.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ function createMainWindow() {
});

const handleRedirect = (e, navUrl) => {
if (navUrl.includes('github.com')) {
if (navUrl.includes(process.env.REACT_APP_GITHUB_DOMAIN || 'github.com')) {
e.preventDefault();
shell.openExternal(navUrl);
}
Expand Down

0 comments on commit 10f58be

Please sign in to comment.