npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

guilded-authlink

v1.0.2

Published

Make OAuth requests to Guilded Authlink, easily and fast.

Downloads

8

Readme

Guilded Authlink

A new way to make OAuth requests to the authlink API for easier guilded login actions.

Basic Code

A simple setup for your authlink client!

const Authlink = require('guilded-authlink');
const authClient = new Authlink();

// Set the client's credentials
authClient.setClientId('123456789');
authClient.setClientSecret('123456789');
authClient.setRedirectUri('https://example.com/authlink');

// Export the client for use in your routes or elsewhere files.
module.exports = authClient;

And there you have it, a simple authlink client!

Docs

getAccessCode - Get the access token after returning a authorization code from authlink. Example:

const code = "super-awesome-code";
const data = await <AuthlinkClient>.getAccessCode(code);
console.log(`Here is my super awesome access token: ${data.accessToken}`);

refreshToken - Get a new access token after the current one has expired. Example:

const refreshToken = "super-awesome-refresh-token";
const data = await <AuthlinkClient>.refreshToken(refreshToken);
console.log(`Here is my new super awesome refresh token: ${data.refreshToken}`);

revokeToken - Revoke & remove a access token data. Example:

const token = "super-awesome-token";
const data = await <AuthlinkClient>.revokeToken(token);
console.log(`Here is my new super awesome refresh token: ${data.refreshToken}`);

requires identity scope getUser - Get the user data from a access token. Example:

const token = "super-awesome-token";
const data = await <AuthlinkClient>.getUser(token);
console.log(`Here is my favourite user: ${data.name}`);

requires servers scope getUserServers - Get the user's servers from a access token. Example:

const token = "super-awesome-token";
const data = await <AuthlinkClient>.getUserServers(token);
console.log(`Here is my favourite user's servers:`);
console.log(data);

requires server.members.read scope getUserServerMember - Get the user's server member data from an access token and server id. Example:

const token = "super-awesome-token";
const serverId = "123456789";
const data = await <AuthlinkClient>.getUserServerMember(token, serverId);
console.log(`Here is my favourite user's server member data:`);
console.log(data);

Enjoy

That's all there is to it!

For support or suggestions, join our Guilded Server!