Arun Kumar
Feb 22, 2021

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 :)

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Arun Kumar
Arun Kumar

Written by Arun Kumar

Senior Software Engineer at Tech Mahindra

No responses yet

Write a response