codeLabs-summer2021 / 3D-Model-World

A real world environment to place, view, and share all your 3D models.
https://3d-model-world.netlify.app/
2 stars 0 forks source link

Redirect back to the same window after doing Sketchfab OAuth #59

Closed OmarShehata closed 3 years ago

OmarShehata commented 3 years ago

One thing we were talking about improving is how when you login to Sketchfab, it takes you to a new tab, and you have this old tab open of the app which may be confusing.

I didn't know of a better way to do it, but I just realized other websites will typically do the following:

  1. Open up a new window instead of a new tab to do the OAuth
  2. This new window can be controlled/communicate with the tab that opened it, so our app can detect when the OAuth is done
  3. It can then close that window and refresh the app so it's ready to use Sketchfab models

You can see an example of this if you sign up/login to PlayCanvas (this is a 3D game engine similar to Unity but in the browser) playcanvas.com

This StackOverflow answer elaborates on it more: https://stackoverflow.com/a/7607058

@randrade8311 this isn't high priority for the app itself, but it is a good topic for you to write an article about it. Once we're done with the video you should implement this either in our app or in a standalone project and write an article draft/outline on it that we can work on together.

OmarShehata commented 3 years ago

@CalebMcOlin it might also be worth mentioning in the presentation/tech talk how everything you're talking about with OAuth here applies to something like "Login with Google" to make it clear of the importance of making something like this secure, when you're explaining the security of web apps & OAuth

CalebMcOlin commented 3 years ago

Closed during repo overhaul.

Reason: Completed.