Loading go-apps/meep-platform-ctrl/server/user_authentication.go +7 −1 Original line number Diff line number Diff line Loading @@ -147,7 +147,7 @@ func delLoginRequest(state string) { } func getErrUrl(err string) string { return pfmCtrl.uri + "?err=" + strings.ReplaceAll(err, " ", "_") return pfmCtrl.uri + "?err=" + strings.ReplaceAll(err, " ", "+") } func uaLoginOAuth(w http.ResponseWriter, r *http.Request) { Loading Loading @@ -228,6 +228,12 @@ func uaAuthorize(w http.ResponseWriter, r *http.Request) { switch provider { case OAUTH_PROVIDER_GITHUB: oauthClient := config.Client(context.Background(), token) if oauthClient == nil { err = errors.New("Failed to create new GitHub oauth client") log.Error(err.Error()) http.Redirect(w, r, getErrUrl(err.Error()), http.StatusFound) return } client := github.NewClient(oauthClient) if client == nil { err = errors.New("Failed to create new GitHub client") Loading Loading
go-apps/meep-platform-ctrl/server/user_authentication.go +7 −1 Original line number Diff line number Diff line Loading @@ -147,7 +147,7 @@ func delLoginRequest(state string) { } func getErrUrl(err string) string { return pfmCtrl.uri + "?err=" + strings.ReplaceAll(err, " ", "_") return pfmCtrl.uri + "?err=" + strings.ReplaceAll(err, " ", "+") } func uaLoginOAuth(w http.ResponseWriter, r *http.Request) { Loading Loading @@ -228,6 +228,12 @@ func uaAuthorize(w http.ResponseWriter, r *http.Request) { switch provider { case OAUTH_PROVIDER_GITHUB: oauthClient := config.Client(context.Background(), token) if oauthClient == nil { err = errors.New("Failed to create new GitHub oauth client") log.Error(err.Error()) http.Redirect(w, r, getErrUrl(err.Error()), http.StatusFound) return } client := github.NewClient(oauthClient) if client == nil { err = errors.New("Failed to create new GitHub client") Loading