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

Problems with GItea OAuth #24

Closed
Shuenhoy opened this issue May 2, 2023 · 6 comments · Fixed by #26
Closed

Problems with GItea OAuth #24

Shuenhoy opened this issue May 2, 2023 · 6 comments · Fixed by #26
Labels
enhancement New feature or request

Comments

@Shuenhoy
Copy link

Shuenhoy commented May 2, 2023

Great work! However, I meet some problems with my private Gitea instance:

  • If the first account is logged in with Gitea, It will not be treated as admin account
  • Disable-signup also prevents a new Gitea user login (My Gitea instance disabled signup already, so all users from Gitea are verified.)

Suggestions:
Add a new option like gitea_limited, when it's true, all users should be from Gitea, which means sign-up would be disabled and login widget should also not appear, only the "continue with Gitea" button is shown (similar to Drone).

Thanks!

@thomiceli
Copy link
Owner

Thanks for the feedback, i will fix the first item.
For the second item, i would rather have an option in the admin panel to disable logins/signups with login and password.

Thoughts ?

@thomiceli thomiceli added the enhancement New feature or request label May 4, 2023
@Shuenhoy
Copy link
Author

Shuenhoy commented May 4, 2023

Thanks for the feedback, i will fix the first item. For the second item, i would rather have an option in the admin panel to disable logins/signups with login and password.

Thoughts ?

Thanks for your reply!
I think it's ok to have the option in the admin panel.

@josefandersson
Copy link
Contributor

i would rather have an option in the admin panel to disable logins/signups with login and password

Hey @thomiceli what's the thought process behind whether an option should go in the admin panel or the config? My initial thought was that no option should go in the Admin panel since it's unnecessary and just arbitrarily spreads settings up into two kinds. Instead I feel that the Admin panel should solely be for user/data administration, that cannot reasonably be done via config file.

@thomiceli
Copy link
Owner

thomiceli commented May 6, 2023

i would rather have an option in the admin panel to disable logins/signups with login and password

Hey @thomiceli what's the thought process behind whether an option should go in the admin panel or the config? My initial thought was that no option should go in the Admin panel since it's unnecessary and just arbitrarily spreads settings up into two kinds. Instead I feel that the Admin panel should solely be for user/data administration, that cannot reasonably be done via config file.

I had the same reasoning, then it turned out it would be painful to have some of the options in the config file (see #5 and #8). So i like to put here boolean configuration which doesn't need a server restart (also like Gitea does it, see attached)

Screenshot 2023-05-06 at 04 03 18

..although I admit I should rework the UI of this part of the admin panel to make it a bit clearer

@josefandersson
Copy link
Contributor

I understand where you're coming from but I'm not convinced by the mentioned issues. Registration could always be allowed when when no user exist in db no matter the settings and I don't think having to restart the server for major setting changes is unreasonable, especially on a small scale service like this one.

That said, I am not against settings in the admin panel over a config file. If options in the admin panel is the way forward then I would just make sure to be strict about options in config solely being prerequisites for service startup (which you've already done a good job of). OAuth options could be moved away perhaps? external-url? http.git-enabled? (Not sure if the libs you have used handle these being changed on the fly.)

Sorry for off-topic!

@saaremaa
Copy link

saaremaa commented May 6, 2023

I set up the integration as described in the instructions (https://github.com/thomiceli/opengist#configure-oauth) . Connected Gitea and Opengist. When i try to log in through the user Gitea, an error occurs. Error 400 Bad Request Cannot complete user auth. What could be wrong?

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

Successfully merging a pull request may close this issue.

4 participants