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

@authbird/client-sdk

v1.0.1

Published

<h1 align="center"> <b> <a href="https://axios-http.com"> <img src="assets/authbird_logo.png" alt="AuthBird Logo"/> </a> </b> </h1>

Downloads

14

Readme

npm version Build status

AuthBird Client SDK

Getting Started

Before you can use this SDK, you need to create an account on authbird.com.

Please check out the detailed docs.

1. Installation

npm install @authbird/client-sdk

CDN

UNPKG.com


<script src="https://unpkg.com/@authbird/[email protected]/lib/cjs/index.js"></script>

jsDelivr.com


<script src="https://cdn.jsdelivr.net/npm/@authbird/[email protected]/lib/cjs/index.js"></script>

Usage

After the package is installed, the library can be imported using import or require approach:

2. Import the SDK

const authbird = require('@authbird/client-sdk');

or

import {init, session, browser} from '@authbird/client-sdk';

Init the SDK

Initialize the SDK with your appId and appSecret.

authbird.init({
  appId: '<your appId>',
  appSecret: '<your appSecret>'
});

3. Authentication flow

a) Browser flow

To simplify the user login process for the browser, we have developed a straightforward function.

const user = await authbird.browser.loginUser('<login provider>');

Example response data:

{
 "accessToken": "<accessToken>",
 "profile": {
  "photoUrl": "<photoUrl>",
  "provider": "<provider>",
  "displayName": "<displayName>",
  "id": "<id>",
  "email": "<email>"
 }
}

b) Session flow

If you desire greater control, you have the option to manage sessions on your own.

Create Session
const newSession = await authbird.session.create();

Example response data:

{
 "sessionId": "<sessionId>",
 "sessionSecret": "<sessionSecret>",
 "loginUrls": {
  "google": "https://api.authbird.com/auth/google?sessionId=<sessionId>",
  "facebook": "https://api.authbird.com/auth/facebook?sessionId=<sessionId>"
 }
}
Retrieve user session data
const userAuthData = await authbird.session.getUserData('<sessionSecret>');

Example response data:

{
 "accessToken": "<accessToken>",
 "profile": {
  "photoUrl": "<photoUrl>",
  "provider": "<provider>",
  "displayName": "<displayName>",
  "id": "<id>",
  "email": "<email>"
 }
}

Continuous Integration and Continuous Delivery (CI/CD)

The Test pipeline is triggered in push and pull requests to the main branch.

The Release pipeline is triggered when merging PR to the main branch. It does the Github release, builds the library and publish it on npm.

The release version is calculated automatically based on commit messages using semantic release. The example table below shows which commit message gets you which release type:

| Commit message | Release type | |--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------| | fix(pencil): stop graphite breaking when too much pressure applied | Fix Release (Patch) | | feat(pencil): add 'graphiteWidth' option | Feature Release (Minor) | | perf(pencil): remove graphiteWidth optionBREAKING CHANGE: The graphiteWidth option has been removed.The default graphite width of 10mm is always used for performance reasons. | Breaking Release (Major) (Note that the BREAKING CHANGE: token must be in the footer of the commit) |

Please remember that for the CD (Continuous Deployment) to function correctly, it is essential to provide a proper commit message.

Contributing

Authbird welcomes all kinds of contributions! Whether it's code fixes, feature enhancements, documentation updates, additional tests, or helping with pull requests and issues, we appreciate any support you can provide. Your contributions play a vital role in improving our project.

Join us and make a difference!

License

MIT