We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 58ec98f commit 56f6f2aCopy full SHA for 56f6f2a
1 file changed
projects/github-auth-lib/src/lib/services/github-auth.service.ts
@@ -30,11 +30,18 @@ export class GithubAuthService {
30
}
31
32
login() {
33
+ let scopes = '';
34
+ if (!this.config.scopes) {
35
+ scopes = 'user'
36
+ }
37
+ else {
38
+ scopes = this.config.scopes.join('%20');
39
40
let url = `https://github.com/login/oauth/authorize`
41
+ `?client_id=${this.config.clientId}`
42
+ `&state=${this.generateRandomString(40)}`
43
+ `&redirect_uri=${this.config.redirectUrl}`
- + `&scope=${this.config.scopes.join('%20')}`
44
+ + `&scope=${scopes}`
45
window.open(url, '_self');
46
47
0 commit comments