shama / letswritecode

:mortar_board: code examples for Let's Write Code
https://www.youtube.com/user/kylerobinsonyoung
804 stars 759 forks source link

chrome extension authentication to web app #30

Open simplytech opened 3 years ago

simplytech commented 3 years ago

Thanks for the https://www.youtube.com/watch?v=Ipa58NVGs_c chrome extension tutorial! I found it very helpful.

I would be very interested in learning how to authenticate from this extension. For example, suppose I have a Rails 6 web app that is using Devise for authentication. From the Chrome extension, how do I know if the user is logged in or not?

I have researched and found the following, but it is still not clear to me, and most of the info is out-of-date:

https://stackoverflow.com/questions/13681098/chrome-extension-devise-rails-app-making-authenticated-requests-from-exten https://stackoverflow.com/questions/58621200/user-authentication-in-chrome-extension-for-rails-app-with-devise https://stackoverflow.com/questions/30171310/web-app-and-chrome-extension-separate-authentication

Moreover, https://developer.chrome.com/docs/apps/app_identity/ has a warning that Chrome Apps will be deprecated, so I'm not sure if this document still applies to Chrome Extensions even after Google removes support for Chrome Apps.