-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Added Authentication API #3923
Added Authentication API #3923
Conversation
Added authentication.cr Updated routes.cr Updated captcha.cr Updated tokens.cr
You technically don't have to create a new PR for squashing commits :) (next time it would be great to do it under the same PR). |
@unixfox I could not squash my commits in that branch. I tried several different ways, but to no avail. I'm not an expert at Github, so the easiest solution I could find was to cherry pick my commits without a merge, then squash, then merge. For whatever reason, Github would not allow me to squash these commits on that branch. My apologies if I'm doing something the round about way, I have never done a pull request, or had a pull request give me these errors. If there is a way to open the same PR but for a different branch, I would love to know. |
What I can recommend for the next time you need to squash commits:
|
I have a few questions regarding this PR:
|
@SamantazFox I've looked through the API on the official website. Not only is it out of date, it is poorly documented. I was having troubles using token authentication because of the following issues:
These routes I implemented are the easiest way to accomplish my task; a collection of endpoints that operate on purely JSON to perform registration and authentication. If you would like, I could create a separate PR to attempt to alter existing API to fit my needs while still functioning identically. The only reason I did not do this is because it would change how the Front End sends requests, and how the back end processes the requests. |
yes, I know about the bad state of our API docs. Sorry for that :/ Not being able to register through the API is normal. I'm not aware of any website/service that allows to do so (they all require the user to manually create an account first). As for the login, it's not required once you have an API token. An SID cookie is simply an API token with a wildcard scope ( But I'm wondering why you couldn't use the As far as my knowledge goes, the best option is to use your own invidious instance (so that you can control CORS response headers) or use some middleware to do the request, rather than handling that on the client side. As for the I admit that the token management UI is terrible, and would need a refresh. |
This pull request has been automatically marked as stale and will be closed in 30 days because it has not had recent activity and is much likely abandoned or outdated. If you think this pull request is still relevant and applicable, you just have to post a comment and it will be unmarked. |
Adds the ability to perform authentication by purely using the API, JSON, and Cookie Headers.
An updated and squashed version of my previous pull request.
I am still learning pull requests, so any advice and pointers would be helpful. Thank you!
Added authentication.cr
Updated routes.cr
Updated captcha.cr
Updated tokens.cr