Skip to content

Commit 54ee1cf

Browse files
committed
Made the callback URL an environment variable to avoid having to keep
rebuilding.
1 parent 169551a commit 54ee1cf

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,13 @@ In the main directory:
7676
```
7777
export GOOGLE_CLIENT_ID=<your client ID from Google>
7878
export GOOGLE_CLIENT_SECRET=<your client secret from Google>
79+
export GOOGLE_CALLBACK_URL=<oAuth Callback URL that you set with Google>
7980
<path-to-go-links>/go-links
8081
```
8182

82-
You can chose which HTTP port to use by passing to `go-links` the port through
83-
the -port parameter or set the environment variable PORT:
84-
85-
`go-links -port=8888`
83+
You can chose which HTTP and HTTPS ports to use by passing to `go-links` the
84+
port through command line parameters or environment variables. `go-links`-help`
85+
will show the different parameters.
8686

8787
## Browser Extension
8888

google_oauth.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ var gconfig = &oauth2.Config{
1818
// obtained from https://console.developers.google.com
1919
ClientID: os.Getenv("GOOGLE_CLIENT_ID"),
2020
ClientSecret: os.Getenv("GOOGLE_CLIENT_SECRET"),
21-
RedirectURL: "http://localhost:8080/_callback", // This should match your configured redirect URI
21+
RedirectURL: os.Getenv("GOOGLE_CALLBACK_URL"), // This should match your configured redirect URI
2222
Scopes: []string{
2323
"https://www.googleapis.com/auth/userinfo.email",
2424
"https://www.googleapis.com/auth/userinfo.profile",

0 commit comments

Comments
 (0)