Skip to content

Configure OAuth/JWT flow for Meetup #122

@zenlex

Description

@zenlex

Note: for support questions, please use #ug-code-for-tulsa slack channel in Techlahoma or stackoverflow. This repository's issues are reserved for feature requests and bug reports.

sample flow from slack meetup connection:

const fs = require('fs');
const privateKey = fs.readFileSync(`${__dirname}/../jwt_priv.pem`, 'utf8');
​
// source .env file one directory up
const env = require('dotenv').config({path: `${__dirname}/../.env`});
const SELF_ID = env.parsed.SELF_ID;
const CLIENT_SECRET = env.parsed.CLIENT_SECRET;
const SIGNING_KEY_ID = env.parsed.SIGNING_KEY_ID;
​
const token = jwt.sign(
  {},
  privateKey,
  {
    algorithm: 'RS256',
    issuer: CLIENT_SECRET,
    subject: SELF_ID,
    audience: 'api.meetup.com',
    keyid: SIGNING_KEY_ID,
    expiresIn: 120
  }
);
​
console.log(token);

Metadata

Metadata

Assignees

No one assigned

    Labels

    back endapis, server logic, plugins

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions