Get more user info from provider's userinfo endpoint

This commit is contained in:
phil 2025-01-13 05:37:55 +01:00
parent 724887e133
commit b5f2e5b57b
3 changed files with 42 additions and 8 deletions

View file

@ -19,7 +19,7 @@ class OIDCProvider(BaseModel):
url: str
client_id: str
client_secret: str = ""
hint: str = "Use your own credentials"
hint: str = "No hint"
@computed_field
@property
@ -29,7 +29,7 @@ class OIDCProvider(BaseModel):
@computed_field
@property
def token_url(self) -> str:
return "auth/" + self.name
return "auth/" + self.id
class OIDCSettings(BaseModel):
@ -43,6 +43,7 @@ class Settings(BaseSettings):
oidc: OIDCSettings = OIDCSettings()
secret_key: str = "".join(random.choice(string.ascii_letters) for _ in range(16))
log: bool = False
model_config = SettingsConfigDict(env_nested_delimiter="__")