import express from 'express'
import database from '../db.js'
import fetch from 'node-fetch'
import chalk from 'chalk'
import {parseJSON, findAccountWithMatchingToken} from '../helpers/index.js'
import {encrypt, decrypt} from '../encryption.js'
const {createHmac, timingSafeEqual} = await import('node:crypto')
const oauthRouter = express.Router()