javascript - 如何在 Deno js 中使用 Google OAuth?
问题描述
Deno.js 中是否有一些用于 Google OAuth 的库或模块?我正在尝试在我的 Web 应用程序上实现 google 登录,并使用这个 google 帐户在 deno.js 中上传 youtube 视频。
我很感激任何帮助!
解决方案
看看youtube-deno。我自己没有使用过,但它似乎提供了一个很好的接口,可以通过 deno 与 Youtube API 进行通信。
这是自述文件中的一个示例:
// A simple example to call the search_list() function and log the response json.
import { YouTube } from "https://x.nest.land/youtube-deno@0.0.6/mod.ts";
let obj = new YouTube("your-api-key-here", false);
obj.search_list({part: "snippet", q: "the coding train"}).then(function(response){
console.log(response);
});