Skip to content

Commit adf357e

Browse files
sffcgr2m
authored andcommitted
fix: URL parameter 'scopes' 👉 'scope' (#16)
1 parent ec7eadc commit adf357e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ function urlBuilderAuthorize (base: string, options: Result) {
4848
clientId: 'client_id',
4949
login: 'login',
5050
redirectUrl: 'redirect_url',
51-
scopes: 'scopes',
51+
scopes: 'scope',
5252
state: 'state',
5353
}
5454

test/index.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ test('scopes = "user,public_repo, gist notifications"', () => {
110110
redirectUrl: null,
111111
scopes: ['user', 'public_repo', 'gist', 'notifications'],
112112
state: '4feornbt361',
113-
url: 'https://github.com/login/oauth/authorize?allow_signup=true&client_id=1234567890abcdef1234&login=octocat&scopes=user,public_repo,gist,notifications&state=4feornbt361'
113+
url: 'https://github.com/login/oauth/authorize?allow_signup=true&client_id=1234567890abcdef1234&login=octocat&scope=user,public_repo,gist,notifications&state=4feornbt361'
114114
})
115115
})
116116

@@ -127,7 +127,7 @@ test('allowSignup = false', () => {
127127
redirectUrl: null,
128128
scopes: ['user', 'public_repo', 'gist', 'notifications'],
129129
state: '4feornbt361',
130-
url: 'https://github.com/login/oauth/authorize?allow_signup=false&client_id=1234567890abcdef1234&login=octocat&scopes=user,public_repo,gist,notifications&state=4feornbt361'
130+
url: 'https://github.com/login/oauth/authorize?allow_signup=false&client_id=1234567890abcdef1234&login=octocat&scope=user,public_repo,gist,notifications&state=4feornbt361'
131131
})
132132
})
133133

0 commit comments

Comments
 (0)