Skip to content

reddit/node-private

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@r/private

A module that provides utilities for when you own your own reddit install.

Snoode Enhancements

Login, Register, and Token Refresh

Usage

import APIOptions from '@r/api-client';
import { PrivateAPI } from '@r/private';

const myAppOptions = {
  ...APIOptions,
  clientSecret: 'my-client-secret'
  clientId: 'my-super-secret-app-id',
  withEmailScope: false, // only supported for non-embedded apps
};

const token = await PrivateAPI.login(myAppOptions, username, password);
const newToken = await PrivateAPI.refreshToken(myAppOptions, token.refresh_token);

const token = await PrivateAPI.convertCookiesToAuthToken(myAppOptions, cookies.split(';'));

About

login / register / etc endpoints, only useful if you have access your own reddit instance

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published