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

/basic-discordoauth2/

    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