File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -11,10 +11,11 @@ See [GitHub’s Developer Guide for the OAuth web application flow](https://deve
11
11
## Usage
12
12
13
13
``` 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'
15
16
16
17
// get login URL
17
- const { url } = login ({
18
+ const { url } = oauthLoginUrl ({
18
19
clientId: ' 1234567890abcdef1234'
19
20
})
20
21
@@ -32,7 +33,7 @@ const {
32
33
login,
33
34
scopes,
34
35
state
35
- } = login ({
36
+ } = oauthLoginUrl ({
36
37
clientId: ' 1234567890abcdef1234' ,
37
38
redirectUri: ' https://example.com' ,
38
39
login: ' octocat' ,
@@ -55,7 +56,7 @@ const myLogin = login.defaults({
55
56
client: ' 1234567890abcdef1234'
56
57
})
57
58
58
- location .href = myLogin ().url
59
+ location .href = oauthLoginUrl ().url
59
60
```
60
61
61
62
## Options
@@ -150,7 +151,7 @@ location.href = myLogin().url
150
151
151
152
## Result
152
153
153
- ` login ()` returns an object with the following properties
154
+ ` oauthLoginUrl ()` returns an object with the following properties
154
155
155
156
<table >
156
157
<thead align =left >
You can’t perform that action at this time.
0 commit comments