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!
Google APIs use the OAuth 2.0 protocol for authentication and authorization. Google supports common OAuth 2.0 scenarios such as those for web server, client-side, installed, and limited-input device applications. To begin, obtain OAuth 2.0 client credentials from the Google API Console.
Google supports common OAuth 2.0 scenarios such as those for web server, client-side, installed, and limited-input device applications. To begin, obtain OAuth 2.0 client credentials from the Google API Console.
Client-side (JavaScript) applications. The Google OAuth 2.0 endpoint supports JavaScript applications that run in a browser. The authorization sequence begins when your application redirects a browser to a Google URL; the URL includes query parameters that indicate the type of access being requested.
Obtain OAuth 2.0 credentials from the Google API Console. Visit the Google API Console to obtain OAuth 2.0 credentials such as a client ID and client secret that are known to both Google and your application. The set of values varies based on what type of application you are building.
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);
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With