Grow your YouTube views, likes and subscribers for free
Get Free YouTube Subscribers, Views and Likes

How to Create Events in Google Calendar API using OAuth2.0

Follow
Mafia Codes

In this video we will learn how to use #OAuth2 to sign in a user to their #Google account and ask them the permission for their #calendar so that events can be created on their behalf. In this process we will learn a couple of things, like how to get the user email and profile information using OAuth2 and #openid, also we will learn how to add #scopes when accepting google sign in.

What we’ll cover:
1. We will start by creating a new Project in Google Developers console. Then we will configure out project for OAuth consent screen, enable Calendar API, add scopes for signin, and creating credentials like the api secret and the api key.
2. Then we create out frontend ReactJS application and connect google sign in to get the authorization code for offline use, which will then be eventually used at the backend code will be exchanged to get refresh token, access token and id token.
3. Backend application will be a very simple express application.

Some other questions which will be answered in the video:
Q1. People often complain about their #refreshtokens being expired after 7 days.
Q2. People complain that they do not get refresh token when they use code to get the tokens server side.


FREE $100 credit @Digital Ocean: https://m.do.co/c/3208f08b3324

Subscribe: https://www.youtube.com/c/yourstruly2...

Support the channel:
Paypal: https://www.paypal.me/trulymittal
Patreon:   / trulymittal  

⭐ Kite is a free AIpowered coding assistant that will help you code faster and smarter. The Kite plugin integrates with all the top editors and IDEs to give you smart completions and documentation while you’re typing. I've been using Kite for 6 months and I love it! https://www.kite.com/getkite/?utm_me...


https://www.npmjs.com/package/reactg...
https://www.npmjs.com/package/express...
https://www.npmjs.com/package/googleapis
https://myaccount.google.com/permissions

0:00 Preview
1:43 Introduction
3:44 New Google Project
4:27 Enabling Calendar API
5:15 OAuth consent screen
8:22 OAuth2.0 client id and secret
10:11 Frontend ReactJS application
11:32 install React Google Login
13:00 Google Login component
15:35 IMPORTANT: Auth code to get access code and refresh token
19:30 Backend express application using expressdraft
23:29 API route to generate access and refresh tokens
28:00 Fixing CORS issue using Proxy pass to backend
30:28 Refresh token Access token and ID token
35:11 Answer: Refresh token is NOT returned
39:05 Creating an event
39:49 Event form
46:45 Conditionally showing login and form
51:26 Calendar API to create event
59:10 Refresh token expires after 7 days

======================
✔ Other useful Playlists
======================
RestAPI (#NodeJS and MongoDB):    • REST API using NodeJS and MongoDB  
API Authentication using #JWT:    • NodeJS API Authentication (JWT's)  
Firebase:    • Firebase | Build a Notes App  
Docker:    • Docker  
MongoDB:    • Learn MongoDB in 50 minutes (Crash Co...  
Html/Css/Js:    • HTML / CSS / JS  
Android:    • Android  
Challenges:    • Challenges  

#yoursTRULY #tutorial #howto #nodejs #reactjs

posted by Frumna7k