At the point of writing (2020), it is a no-brainier to use 2 factor authentication (2FA) for Google Account. Although there are A LOT of guides asking to use "less secure app" route, this guide will not. In fact, I, Holloway, will never introduce such dangerous route to any of you. It's idiotic to drop to less secure environment when the virtual world is filled with that many threats.
This section guides you on how to get your Google Account's app-specific password.
To get app specific password, you need to head over to https://myaccount.google.com/security section when logged in.
Once done, select the "App Passwords" option. Please keep in mind that you will be prompted for password to verify "you are you". Google may go even further like challenging you with your 2FA if they still think you are not you).
Once done, you can create the app-specific password by selecting "select app" or "select device". I recommends select "others" in the options list in order for you to type in your device name. Once you're done, select "Generate
" button to create a password.
Once done, Google Account will prompt you the generated app-specific password, one-time view only. You can copy the password and consume it in your application. Based on the example below, the password is (without space): vhhvlbxyxqyfkvdr
.
IMPORTANT NOTE
That's all for obtaining user account's app specific password.