Signin into electron app from browser window

447 Views Asked by At

I have electron app which uses Angular-Token for Angular and Devise Token Auth for rails backend. Oauth sign in works fine in browser using api provided by Angular-Token. It creates a new window and returns an observable and window closes after authentication is complete.

this.tokenService.signInOAuth(
'github'
).subscribe(
  res =>      console.log(res),
  error =>    console.log(error)
);

I want to implement same functionality in electron app but the problem is this.tokenService.signInOAuth open electron window which I assume is not secure and safe. How do I implement this functionality safely? Github desktop does this nicely by triggering my safari browser window and returning to electron app after auth is complete.

0

There are 0 best solutions below