basic-discordoauth2

1.0.2 • Public • Published

Basic Discord OAUTH2

Example Usage

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);
	});
})();

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.2
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.2
    0
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i basic-discordoauth2

Weekly Downloads

0

Version

1.0.2

License

MIT

Unpacked Size

3.86 kB

Total Files

3

Last publish

Collaborators

  • thegears