Hi Ashwin,
Let me breakdown the main parts. There will be two main application.
1. Electron App
2. React website (or any basic HTML site)
a. When the "sign in" button pressed in the Electron App, it will be redirected to the website, where the google authentication and tokens will be retrieved.
https://gist.github.com/ak2403/1e1fc57b7e3b99a38c4e67a1f02ab018#file-renderer-js-L8
b. Once the authentication is successful, the website will redirect it to the app using the appName that we configured.
https://gist.github.com/ak2403/55583ea945b8d0f602bec8e10d812547#file-gistfile1-txt-L12
c. The redirect of website will be captured in the "open-url" function in the Electron. (The callback data from the website will be captured here)
Also, I will try to upload the source code in the Github for your reference.
Hope this helps :)