Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using Nodejs and oauth with gmail

I understand the concept of oauth for the most part. I've done quite a bit of research, but I'm having a lot of difficulty understanding how to use oauth to gain access to Gmail. I can't seem to find any concrete documentation for it.

I know there are a lot of node libraries for oauth, which one would you recommend me use? Is there any noob friendly tutorials for using node and oauth?

Just anything in general; I just need somewhere to start so I can understand how to apply oauth with nodejs.

I've used nodejs before, but I can't say I'm an expert in it.

like image 697
Ostap Hnatyuk Avatar asked May 29 '26 01:05

Ostap Hnatyuk


1 Answers

First get an access token by following the Web Server Applications flow. You can check out node-oauth to accomplish this.

Then you need an IMAP library that supports Google's XOAUTH2 authentication mechanism. Fortunately there's node-imap, that recently added this.

like image 124
Jan Gerlinger Avatar answered May 30 '26 13:05

Jan Gerlinger



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!