Skip to content

Commit

Permalink
Merge pull request #1946 from h3poteto/fix/readme
Browse files Browse the repository at this point in the history
Fix readme for oauth
  • Loading branch information
h3poteto authored Sep 26, 2023
2 parents c31a996 + d760653 commit 4a878bb
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,8 @@ const client = generator('mastodon', BASE_URL)

client.registerApp('Test App')
.then(appData => {
clientId = appData.clientId
clientSecret = appData.clientSecret
clientId = appData.client_id
clientSecret = appData.client_secret
console.log('Authorization URL is generated.')
console.log(appData.url)
})
Expand All @@ -177,11 +177,11 @@ After that, get an access token.
```typescript
const code = '...' // Authorization code

client.fetchAccessToken(clientId, clientSecret, code)
client.fetchAccessToken(client_id, client_secret, code)
})
.then((tokenData: OAuth.TokenData) => {
console.log(tokenData.accessToken)
console.log(tokenData.refreshToken)
console.log(tokenData.access_token)
console.log(tokenData.refresh_token)
})
.catch((err: Error) => console.error(err))
```
Expand Down

0 comments on commit 4a878bb

Please sign in to comment.