Skip to content

Commit 05c1654

Browse files
committed
docs(README): octokitOauthLogin -> login
1 parent 17d4dd8 commit 05c1654

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ See [GitHub’s Developer Guide for the OAuth web application flow](https://deve
1111
## Usage
1212

1313
```js
14-
const { url } = octokitOauthLogin({
14+
const login = require('@octokit/oauth-login-url').default
15+
16+
// get login URL
17+
const { url } = login({
1518
clientId: '1234567890abcdef1234'
1619
})
1720

@@ -29,7 +32,7 @@ const {
2932
login,
3033
scopes,
3134
state
32-
} = octokitOauthLogin({
35+
} = login({
3336
clientId: '1234567890abcdef1234',
3437
redirectUri: 'https://example.com',
3538
login: 'octocat',
@@ -46,7 +49,7 @@ const {
4649
Override or set default options
4750

4851
```js
49-
const myLogin = octokitOauthLogin.defaults({
52+
const myLogin = login.defaults({
5053
baseUrl: 'https://github.my-enterprise.com',
5154
defaultRedirectUri: 'https://app.my-enterprise.com',
5255
client: '1234567890abcdef1234'
@@ -147,7 +150,7 @@ location.href = myLogin().url
147150

148151
## Result
149152

150-
`octokitOauthLogin()` returns an object with the following properties
153+
`login()` returns an object with the following properties
151154

152155
<table>
153156
<thead align=left>

0 commit comments

Comments
 (0)