1
2
3
4
5
6
7
8
9
import { quickShareUserTokens } from "https://esm.town/v/mcwhittemore/quickShareUserTokens";
import { quickShareStateId } from "https://esm.town/v/mcwhittemore/quickShareStateId";
export let quickShareGithubAuthStart = async (req, res) => {
const state = await quickShareStateId();
quickShareUserTokens[state] = Date.now();
const queryString = `client_id=d99609f5d263923d0e62&scope=repo&state=${state}`;
res.redirect(`https://github.com/login/oauth/authorize?${queryString}`);
};