Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate URLs for sites behind logins #401

Open
dabukalam opened this issue May 31, 2021 · 1 comment
Open

Generate URLs for sites behind logins #401

dabukalam opened this issue May 31, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@dabukalam
Copy link
Contributor

For websites behind logins, it would be nice if you could generate and send a logged in cookie along with the request, to properly render that URL.

Actually sending the cookie in the HTTP header looks like it would be straightforward - generating the cookie will probably be more hassle and be different depending on the sites. Most are probably OAuth though.

@nuxeh
Copy link
Owner

nuxeh commented Jun 13, 2021

Interesting idea. Yes, reqwest's cookie store is already used, cookies are a pretty basic requirement for url-bot-rs to do its thing... many sites request setting a cookie and a redirect, and don't give anything useful otherwise, for example.

I'm not sure what you mean by "generate", surely such a cookie has to be generated server side?

Also, I suspect that this can't be generalised, even with OAuth (which i know very little about), guessing it'll still have a site-specific OAuth endpoint/url, or otherwise, login form.

I do think it would be quite feasible to make a plugin for any required services, which logs in using the site's login form url each time a title request is made for a matching domain, prior to then making the actual request. I imagine cookies may be handled automatically in this case, since url-bot-rs uses a persistent reqwest client for all requests. Some user/password login info could be stored in the config to do this. Also, doing this on a per-request basis, would eliminate stateful management of any cookies and their expiry.

@nuxeh nuxeh added the enhancement New feature or request label Jun 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants