Very rudimentary development version of zoom auth #4
parent
46474c9c70
commit
615e59cde7
|
@ -21,7 +21,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
|
||||||
// Convert to token
|
// Convert to token
|
||||||
const options = {
|
const options = {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
qs: {
|
body: {
|
||||||
grant_type: 'authorization_code',
|
grant_type: 'authorization_code',
|
||||||
code,
|
code,
|
||||||
redirect_uri: authUrl
|
redirect_uri: authUrl
|
||||||
|
@ -32,7 +32,8 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
|
||||||
};
|
};
|
||||||
|
|
||||||
return new Promise( async (resolve, reject) => {
|
return new Promise( async (resolve, reject) => {
|
||||||
const result = await fetch('https://zoom.us/oauth/token', options);
|
const result = await fetch('https://zoom.us/oauth/token', options)
|
||||||
|
.then(res => res.text());
|
||||||
console.log(result);
|
console.log(result);
|
||||||
|
|
||||||
/*const credential = await prisma.credential.create({
|
/*const credential = await prisma.credential.create({
|
||||||
|
|
Loading…
Reference in New Issue