Revert "[MM-37984] Allow Desktop App to authenticate via external providers outside of the app on supported servers (#23795)" (#24039)
This reverts commit abdf4e58c3.
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
38fd8cd6aa
Коммит
823ef27d6c
@@ -431,7 +431,7 @@ func (a *App) newSessionUpdateToken(app *model.OAuthApp, accessData *model.Acces
|
||||
return accessRsp, nil
|
||||
}
|
||||
|
||||
func (a *App) GetOAuthLoginEndpoint(w http.ResponseWriter, r *http.Request, service, teamID, action, redirectTo, loginHint string, isMobile bool, desktopToken string) (string, *model.AppError) {
|
||||
func (a *App) GetOAuthLoginEndpoint(w http.ResponseWriter, r *http.Request, service, teamID, action, redirectTo, loginHint string, isMobile bool) (string, *model.AppError) {
|
||||
stateProps := map[string]string{}
|
||||
stateProps["action"] = action
|
||||
if teamID != "" {
|
||||
@@ -442,10 +442,6 @@ func (a *App) GetOAuthLoginEndpoint(w http.ResponseWriter, r *http.Request, serv
|
||||
stateProps["redirect_to"] = redirectTo
|
||||
}
|
||||
|
||||
if desktopToken != "" {
|
||||
stateProps["desktop_token"] = desktopToken
|
||||
}
|
||||
|
||||
stateProps[model.UserAuthServiceIsMobile] = strconv.FormatBool(isMobile)
|
||||
|
||||
authURL, err := a.GetAuthorizationCode(w, r, service, stateProps, loginHint)
|
||||
@@ -456,17 +452,13 @@ func (a *App) GetOAuthLoginEndpoint(w http.ResponseWriter, r *http.Request, serv
|
||||
return authURL, nil
|
||||
}
|
||||
|
||||
func (a *App) GetOAuthSignupEndpoint(w http.ResponseWriter, r *http.Request, service, teamID string, desktopToken string) (string, *model.AppError) {
|
||||
func (a *App) GetOAuthSignupEndpoint(w http.ResponseWriter, r *http.Request, service, teamID string) (string, *model.AppError) {
|
||||
stateProps := map[string]string{}
|
||||
stateProps["action"] = model.OAuthActionSignup
|
||||
if teamID != "" {
|
||||
stateProps["team_id"] = teamID
|
||||
}
|
||||
|
||||
if desktopToken != "" {
|
||||
stateProps["desktop_token"] = desktopToken
|
||||
}
|
||||
|
||||
authURL, err := a.GetAuthorizationCode(w, r, service, stateProps, "")
|
||||
if err != nil {
|
||||
return "", err
|
||||
|
||||
Ссылка в новой задаче
Block a user