mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-03 20:50:19 +08:00
feat: now dingtalk OAuth returns all error messages to frontend (#1405)
This commit is contained in:
@ -256,6 +256,8 @@ func (idp *DingTalkIdProvider) isUserInOrg(unionId string) (bool, error) {
|
|||||||
}
|
}
|
||||||
if data.ErrCode == 60121 {
|
if data.ErrCode == 60121 {
|
||||||
return false, fmt.Errorf("the user is not found in the organization where clientId and clientSecret belong")
|
return false, fmt.Errorf("the user is not found in the organization where clientId and clientSecret belong")
|
||||||
|
} else if data.ErrCode != 0 {
|
||||||
|
return false, fmt.Errorf(data.ErrMessage)
|
||||||
}
|
}
|
||||||
return true, nil
|
return true, nil
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user