Switching Authentication Source for existing user - prev source still works #5589

Closed
opened 2025-11-02 06:30:04 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @markuman on GitHub (Jun 19, 2020).

  • Gitea version (or commit ref): 1.12.0
  • Git version:
  • Operating system: docker
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
    • MariaDB
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

My user was a "local" user. With the update to 1.12, I enabled oauth2 nextcloud auth (works fine).
So I switched the " Authentication Source " for my existing user to the oauth2 method (works fine too).
But now I'm still able to login into that account using the previous "local" source (username and password).
Is it by design, because the user exists before? Or is it a bug?

Originally created by @markuman on GitHub (Jun 19, 2020). - Gitea version (or commit ref): 1.12.0 - Git version: - Operating system: docker - Database (use `[x]`): - [ ] PostgreSQL - [ ] MySQL - [ ] MSSQL - [ ] SQLite - [x] MariaDB - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - [ ] Not relevant - Log gist: ## Description My user was a "local" user. With the update to 1.12, I enabled oauth2 nextcloud auth (works fine). So I switched the " Authentication Source " for my existing user to the oauth2 method (works fine too). But now I'm still able to login into that account using the previous "local" source (username and password). Is it by design, because the user exists before? Or is it a bug?
GiteaMirror added the issue/stale label 2025-11-02 06:30:04 -06:00
Author
Owner

@lunny commented on GitHub (Jun 19, 2020):

I think this is by design. Every user will always have a local user account.

@lunny commented on GitHub (Jun 19, 2020): I think this is by design. Every user will always have a local user account.
Author
Owner

@markuman commented on GitHub (Jun 19, 2020):

So to disable the local auth, I can do

update user set passwd = "" where id = 1

Is it fine? Or a security nightmare? Any other idea?

@markuman commented on GitHub (Jun 19, 2020): So to disable the local auth, I can do ```sql update user set passwd = "" where id = 1 ``` Is it fine? Or a security nightmare? Any other idea?
Author
Owner

@stale[bot] commented on GitHub (Aug 24, 2020):

This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions.

@stale[bot] commented on GitHub (Aug 24, 2020): This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions.
Author
Owner

@stale[bot] commented on GitHub (Sep 7, 2020):

This issue has been automatically closed because of inactivity. You can re-open it if needed.

@stale[bot] commented on GitHub (Sep 7, 2020): This issue has been automatically closed because of inactivity. You can re-open it if needed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#5589