-
Notifications
You must be signed in to change notification settings - Fork 6
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
Implement login #6
Comments
To add some more details on this. The way to authentication works is:
Gitea runs on |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
To make sure I get you clearly. We are going to hook our custom forms (sign in, sign up) to the Gitea endpoints (/user/login/, /user/forgot_password/, /user/sign_up/). |
The issue with forwarding the request to |
Adding your quote from matrix/element chat:
|
Thanks @AbdulrhmnGhanem. Some thoughts:
Anything that requires admin is a no-go in my book. I don't think we should ever use the /admin endpoint for user related things. You should make a |
Can you elaborate on this? |
Dig into the Gitea source a bit and replicate what's done on |
Yeah, it seems the right file. Bad news it explicitly returns HTML. Are you familiar with Go? I never used it before, I'll see if I can find a resource to get me up rapidly.
I'm quite comfortable with the original python BeautifulSoup so I'll consider JSSoup. |
I tend to use learnxinyminutes.com for languages I need to hack something in but am not familiar with. https://learnxinyminutes.com/docs/go/ Alright, JSSoup looks interesting actually. I'm constantly on the search for a nice JS HTML lib that you can use server and client side. Cheerio is still the best I've found but I'm not happy with it. |
I'm afraid it needs node to work so it can't be used in the frontend. 😥 |
Right, well, if that's all you need for now and it makes it easier for you then I'm still fine with it. |
I found the parsing HTML approach will add a chain of 6 requests until the response gets to the client, compared to 2 requests using a custom Gitea endpoint. I didn't consider the proxy server as a stage in both cases. Furthermore, it'll make the JWT part a bit crazy. Let's see what I can do. |
closed by #18 |
We'll want to hide away most of gitea and allow logging in via our own frontend. Ideally we can also enable "login with github/facebook/google".
The text was updated successfully, but these errors were encountered: