teamreflex / oauth2-discord

OAuth2 client for authenticating with the Discord API servers
MIT License
61 stars 26 forks source link

Allow extra scopes #15

Open rubenmeseguer7 opened 7 years ago

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling 4ef4eeda0bb1c2ba3ccc6c9a00519419ddb48dfb on rubenmeseguer7:master into f16528e0d6dd7a652d9154ca1685296e453aa8b6 on teamreflex:master.

Venefilyn commented 6 years ago

The $provider->getAuthorizationUrl() takes in scopes, states, etc. in it's parmeters. Simply just generate $provider->getAuthorizationUrl(['scope' => ['identify', 'guilds']]) and you will only get identify and guilds.

The hardcoded stuff is only if you don't provide it whatsoever.

Edit: Didn't realize the PR is so late, project seems more or less abandoned