feat: don't panic when provider not found in Login() API (#3659)

This commit is contained in:
Anton Berezhnyi 2025-03-13 15:35:51 +02:00 committed by GitHub
parent 30789138e2
commit 3e7938e5f6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -598,6 +598,9 @@ func (c *ApiController) Login() {
c.ResponseError(err.Error())
return
}
if provider == nil {
c.ResponseError(fmt.Sprintf(c.T("auth:The provider: %s does not exist"), authForm.Provider))
}
providerItem := application.GetProviderItem(provider.Name)
if !providerItem.IsProviderVisible() {