4

Working on a sketch plugin which can fetch/collect data from an illustration hosting platform based on user authentication.

I am using SKPM with sketch-module-web-view.

Currently we have Google & Facebook authentication methods for the website. We need the same in sketch plugin to maintain the user session and required functionality.

Please suggest any documentation/tutorial out there.

PS: I have read almost every documentation available in sketch official website and other forums.

Reference - Please check Shutterstock & gallery.io sketch plugins and others.

Thanks

  • How did you implement "Google & Facebook authentication methods for the website"? – Sebastian B. Jul 05 '20 at 19:31
  • Which is the problem in opening you website with sketch-module-web-view and let users log in normally? – Daniele Ricci Jul 05 '20 at 21:06
  • @SebastianB. -- The other dev worked on the website. Angular has been used on front end side. – Inderpreet Singh Jul 06 '20 at 03:44
  • @DanieleRicci -- I just couldn't find the official documentation on sketch website as well other forums regarding the social login in sketch plugin. – Inderpreet Singh Jul 06 '20 at 03:47
  • Could you please give some feedback, @InderpreetSingh ? Thank you – Daniele Ricci Jul 10 '20 at 19:16
  • @DanieleRicci - Thanks for the help, but that didn't solve the actual problem. OAuth2 opens up a new window and in successful login it returns to callback URL. That can not be done in plugin right now and hence receiving an error in return. Trying a way to redirect user to actual browser and then login there but that is not the right approach. It will be helpful if you can share some references and working methods. – Inderpreet Singh Jul 11 '20 at 14:08
  • You could try working on it, I recently implemented a microsoft OAuth2 login in the same window, without any pop up. I actually don't know if this is possible with FB and google, but I think it should be possible and should be more or less just matter of configuration. – Daniele Ricci Jul 11 '20 at 16:11
  • @DanieleRicci - I am trying with reconfiguring the OAuth2 with other available options. – Inderpreet Singh Jul 12 '20 at 07:51
  • I hope you can do it quickly... this bounty is really gluttonous ;) – Daniele Ricci Jul 12 '20 at 14:32
  • I was figuring out other options since I have asked here. I appreciate your help but the solution didn't work. It will be really helpful If you can share some working references. - @DanieleRicci – Inderpreet Singh Jul 13 '20 at 08:15

1 Answers1

0

I don't know exactly which kind of authentication method you used to authenticate users through Google & Facebook on your website, I guess OAuth2. Using OAuth2 it is impossible to authenticate users on a local running app, since OAuth2 strictly requires a callback URL which can't be configured on a local running app.

Since you are using sketch-module-web-view, is not enough to make user land on your website login URL?

const BrowserWindow = require('sketch-module-web-view');

const win = new BrowserWindow();

// load your website login URL
win.loadURL('https://your_website.com/login');

Hope this helps.

Daniele Ricci
  • 15,422
  • 1
  • 27
  • 55