Skip to content

Commit a09f6ab

Browse files
committed
docs(README): named export
1 parent 86e1f23 commit a09f6ab

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

README.md

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

1313
```js
14-
const login = require('@octokit/oauth-login-url').default
14+
const { oauthLoginUrl } = require('@octokit/oauth-login-url')
15+
// or: import { oauthLoginUrl } from '@octokit/oauth-login-url'
1516

1617
// get login URL
17-
const { url } = login({
18+
const { url } = oauthLoginUrl({
1819
clientId: '1234567890abcdef1234'
1920
})
2021

@@ -32,7 +33,7 @@ const {
3233
login,
3334
scopes,
3435
state
35-
} = login({
36+
} = oauthLoginUrl({
3637
clientId: '1234567890abcdef1234',
3738
redirectUri: 'https://example.com',
3839
login: 'octocat',
@@ -55,7 +56,7 @@ const myLogin = login.defaults({
5556
client: '1234567890abcdef1234'
5657
})
5758

58-
location.href = myLogin().url
59+
location.href = oauthLoginUrl().url
5960
```
6061

6162
## Options
@@ -150,7 +151,7 @@ location.href = myLogin().url
150151

151152
## Result
152153

153-
`login()` returns an object with the following properties
154+
`oauthLoginUrl()` returns an object with the following properties
154155

155156
<table>
156157
<thead align=left>

0 commit comments

Comments
 (0)