Github Authentication
GitHub is a web-based platform that enables developers to store and manage their source code repositories,
Github Settings
Connect to Settings.
Create new credential
On the left menu, click on Developer settings
.
- Click on
OAuth Apps
; - And click on
New OAuth App
.
- Enter
Scrapoxy
as Application name; - Enter your app URL as Homepage URL;
- Enter
http://localhost:8890/api/users/auths/github
as Authorization callback URL (replacehttp://localhost:8890
by the external URL of your Scrapoxy instance); - Click on
Register application
.
- Remember the Client ID;
- Click on
Generate a new client secret
;
Remember the Client secret.
Scrapoxy
With Docker
Open the terminal and run the following command:
shell
docker run -d -p 8888:8888 -p 8890:8890 -e FRONTEND_URL=http://localhost:8890 -e AUTH_GITHUB_CLIENT_ID=my_client_id -e AUTH_GITHUB_CLIENT_SECRET=my_client_secret -e BACKEND_JWT_SECRET=secret1 -e FRONTEND_JWT_SECRET=secret2 fabienvauchelles/scrapoxy
Replace:
my_client_id
andmy_client_secret
with the values you copied earlier;http://localhost:8890
by the external URL of your Scrapoxy instance.
Scrapoxy will automatically bootstrap the Github authentication:
With NPM
On Linux
Open the terminal and run the following command:
shell
FRONTEND_URL=http://localhost:8890 AUTH_GITHUB_CLIENT_ID=my_client_id AUTH_GITHUB_CLIENT_SECRET=my_client_secret BACKEND_JWT_SECRET=secret1 FRONTEND_JWT_SECRET=secret2 npx --yes scrapoxy
Replace:
my_client_id
andmy_client_secret
with the values you copied earlier;http://localhost:8890
by the external URL of your Scrapoxy instance.
On Windows
Open the Command Prompt and run the following command:
shell
set FRONTEND_URL=http://localhost:8890
set AUTH_GITHUB_CLIENT_ID=my_client_id
set AUTH_GITHUB_CLIENT_SECRET=my_client_secret
set BACKEND_JWT_SECRET=secret1
set FRONTEND_JWT_SECRET=secret2
npx --yes scrapoxy
Replace:
my_client_id
andmy_client_secret
with the values you copied earlier;http://localhost:8890
by the external URL of your Scrapoxy instance.