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

tinder-access-token-generator

v3.0.8

Published

Client to generate Tinder access tokens

Downloads

17

Readme

Tinder Access Token Generator

Tinder Access Token Generator npm npm

An npm package for use in Node that generates access tokens for the Tinder API using Facebook credentials.

This library does the following

  1. Uses puppeteer to effectively go through the login flow via headless browser
  2. Goes through Tinder confirmation flow - intercepts authentication response and parses access token
  3. Using the Facebook access token, makes a request to Tinder's authentication endpoint to return an API access token and a refresh token

API

generateToken

Generate access and refresh tokens given a Facebook email address and Facebook password.

This access token can be used to make Tinder API requests, while the refresh token can be used later to generate updated access and refresh tokens.

import { generateToken } from 'tinder-access-token-generator';

const {
  apiToken,
  refreshToken,
} = await generateToken({
  facebookEmailAddress: '[email protected]',
  facebookPassword: 'myfacebookpassword',
});

refreshCredentials

Refresh an access token and refresh token given a previous access token and refresh token.

Given a single session (across both web and mobile clients) this method will return the existing access token and refresh token pair.

However, given multiple sessions, when a single session signs out, all access tokens are invalidated and must be refreshed.

Use this method to refresh the credentials for existing sessions.

However, this method will not work when a single session exists (and is subsequently logged out of). In such a case, you'll need to call generateToken.

import { generateToken, refreshCredentials } from 'tinder-access-token-generator';

// Generate credentials
const {
  apiToken,
  refreshToken,
} = await generateToken({
  facebookEmailAddress: '[email protected]',
  facebookPassword: 'myfacebookpassword',
});

// Some time passes...

// Generate updated credentials
const {
  apiToken: updatedApiToken,
  refreshToken: updatedRefreshToken,
} = await refreshCredentials({ apiToken, refreshToken });

Local Development

After cloning the repository, use nvm / npm to install dependencies.

To run all tests, execute npm run test.

To only run integration tests, execute npm run integration-test.

In order to execute local integration tests successfully, you'll need to specify FACEBOOK_EMAIL_ADDRESS, and FACEBOOK_PASSWORD environment variables in a .env file

To build the production bundle, execute npm run build.

Git Hooks

This project uses husky to maintain git hooks.

  • pre-commit - run eslint
  • commit-msg - run commit message linting

Commit Linting

This project uses semantic-release and commitlint (specifically the Angular commit convention) to automatically enforce semantic versioning.