e-learning-archive / browser-extension

Browser extension to help users copy authentication details for coursera-dl
MIT License
6 stars 2 forks source link

Implementing an extension for just grabbing cookies from 1 site is IMHO an overkill. Just a userscript should be enough #2

Closed KOLANICH closed 4 years ago

KOLANICH commented 4 years ago

BTW: IMHO opening a new window is not needed. What is needed is to just capture cookies from already opened and signed in coursera tab and sending it using GM.xmlHttpRequest (unfortunately fetch is not emplemented, but it is straightforward to implement a polyfill in a very few lines of code) to a simple and small local webserver se up by coursera-dl (if you wanna implement it, don't forget that you should bind it to 127.0.0.1, not 0.0.0.0).

infostreams commented 4 years ago

Hi, thanks for your suggestion. That wouldn't solve my use case though, I need this to run on computers that are not running coursera-dl themselves, and it will be used by mostly untrained people. For that use case, an extension is both simple and convenient, they will probably know how to install it and the user interface of the browser extension itself is as simple as can be.

Also, intercepting cookies is not that easy. The CAUTH value that we're after is sent as a httpOnly cookie over a HTTPS connection. How are you going to otherwise get that value if you cannot run anything else on the user's computer?

KOLANICH commented 4 years ago

is sent as a httpOnly cookie over a HTTPS connection

Thanks. That really needs webext features. I guess some api for that should be added to GM and VM.

infostreams commented 4 years ago

Yeah, I agree. One question though, what is GM / VM?

KOLANICH commented 4 years ago

https://addons.mozilla.org/en/firefox/addon/greasemonkey/ https://addons.mozilla.org/en/firefox/addon/violentmonkey/

infostreams commented 4 years ago

Ah, I see. Thanks!