refactor: generalize SSO auth (#2263)
* refactor: first extraction of providers * refactor: remove unused property * refactor: extract `_find_auth_provider_class` * fix: return type * feat: prepare for `keycloak`
This commit is contained in:
@@ -282,19 +282,11 @@ class GoogleAuthSettings(LNbitsSettings):
|
||||
google_client_id: str = Field(default="")
|
||||
google_client_secret: str = Field(default="")
|
||||
|
||||
@property
|
||||
def is_google_auth_configured(self):
|
||||
return self.google_client_id != "" and self.google_client_secret != ""
|
||||
|
||||
|
||||
class GitHubAuthSettings(LNbitsSettings):
|
||||
github_client_id: str = Field(default="")
|
||||
github_client_secret: str = Field(default="")
|
||||
|
||||
@property
|
||||
def is_github_auth_configured(self):
|
||||
return self.github_client_id != "" and self.github_client_secret != ""
|
||||
|
||||
|
||||
class EditableSettings(
|
||||
UsersSettings,
|
||||
|
||||
Reference in New Issue
Block a user