mirror of
https://github.com/casdoor/casdoor.git
synced 2025-09-06 09:50:28 +08:00
feat: fix issue that signing up via provider in shared application will sign up to built-in app (#4093)
This commit is contained in:
@@ -719,7 +719,8 @@ func (c *ApiController) Login() {
|
||||
|
||||
setHttpClient(idProvider, provider.Type)
|
||||
|
||||
if authForm.State != conf.GetConfigString("authState") && authForm.State != application.Name {
|
||||
stateApplicationName := strings.Split(authForm.State, "-org-")[0]
|
||||
if authForm.State != conf.GetConfigString("authState") && stateApplicationName != application.Name {
|
||||
c.ResponseError(fmt.Sprintf(c.T("auth:State expected: %s, but got: %s"), conf.GetConfigString("authState"), authForm.State))
|
||||
return
|
||||
}
|
||||
|
Reference in New Issue
Block a user