Is there some libraries or modules for Google OAuth in Deno.js? I am trying to impelemnt google login on my web application and use this google account for uploading youtube videos in deno.js.
I am grateful for any help!
Is there some libraries or modules for Google OAuth in Deno.js? I am trying to impelemnt google login on my web application and use this google account for uploading youtube videos in deno.js.
I am grateful for any help!
I think a generic solution for OAuth doesn't exist yet. However, if you can override the default implementation, you can try authlete_deno_fen_oauth_server third party module.
There is a generic oauth2 module but not available at the moment.
If the above option doesn't work, try using an npm module in deno as described in this stackoverflow thread and follow this medium article to achieve your goal.
Have a look at youtube-deno. I haven't used it myself, but it seems like it provides a good interface for communicating with the Youtube API with deno.
Here's an example from the readme:
// A simple example to call the search_list() function and log the response json.
import { YouTube } from "https://x.nest.land/[email protected]/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);
});
I think a generic solution for OAuth doesn't exist yet. However, if you can override the default implementation, you can try authlete_deno_fen_oauth_server third party module.
There is a generic oauth2 module but not available at the moment.
If the above option doesn't work, try using an npm module in deno as described in this stackoverflow thread and follow this medium article to achieve your goal.
The module deno-oauth2-client works well, it's small and easy to use.
Another library, Dashport, aims to be like Passport.js for Deno. I had a bit of trouble with their example code, so I put a fork of Dashport here with a few fixes and some example code.
I put together a couple of examples for these OAuth2 libraries in Deno:
© 2022 - 2024 — McMap. All rights reserved.