Skip to content

Commit

Permalink
Add tips for API app creation & creds warning
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandregv committed Mar 19, 2023
1 parent 6bec93e commit 0aa9872
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ A Discord Rich Presence integration for [@42School](https://github.com/42School)
2. On Linux and macOS: Run `chmod +x ./RP42`
3. Create an API App on the Intranet: https://profile.intra.42.fr/oauth/applications/new

/!\ Do NOT share your credentials to someone else, or on GitHub, etc. /!\

## Usage
Run the app like this, using the credentials of your API App:
- Linux: `./RP42 -i CLIENT_ID -s CLIENT_SECRET &`
Expand Down
8 changes: 6 additions & 2 deletions cmd/RP42/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,12 @@ func onReady() {
flag.StringVar(&apiSecret, "secret", "", "Client Secret from API settings")
flag.Usage = func() {
fmt.Print(`Usage of RP42:
-i, --id Client ID from API settings (required)
-s, --secret Client Secret from API settings (required)
-i, --id Client ID of your API app (required)
-s, --secret Client Secret of your API app (required)
If you don't have an API app yet, create one here: https://profile.intra.42.fr/oauth/applications/new
/!\ Do NOT share your credentials to someone else, or on GitHub, etc. /!\
`)
}
flag.Parse()
Expand Down

0 comments on commit 0aa9872

Please sign in to comment.