Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thegears/basic-discordoauth2
Basic Discord OAUTH2
https://github.com/thegears/basic-discordoauth2
discord discordbasic discordoauth discordoauth2
Last synced: 22 days ago
JSON representation
Basic Discord OAUTH2
- Host: GitHub
- URL: https://github.com/thegears/basic-discordoauth2
- Owner: thegears
- Created: 2022-06-27T10:53:17.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-06-27T10:57:27.000Z (over 2 years ago)
- Last Synced: 2024-11-14T11:09:34.473Z (about 1 month ago)
- Topics: discord, discordbasic, discordoauth, discordoauth2
- Language: JavaScript
- Homepage:
- Size: 1.95 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Basic Discord OAUTH2
Example Usage
```js
const bdoa = require("basic-discordoauth2");
const Auth = new bdoa.Auth({
clientId: "client id",
clientSecret: "client secret",
redirectUri: "redirect uri",
scopes: ["identify", "guilds"]
});(async () => {
let token = await Auth.Token("code");
let refreshToken = await Auth.RefreshToken(token.refresh_token);await Auth.Guilds(refreshToken).then(a2 => {
console.log(a2);
});refreshToken = await Auth.RefreshToken(refreshToken.refresh_token);
await Auth.Me(refreshToken).then(a2 => {
console.log(a2);
});
})();
```