Skip to content

Commit

Permalink
Add Site URL to third-party cookie error message (#478)
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewDorner authored Mar 22, 2020
1 parent 2b7d074 commit d1c74e3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion server/user_cloud.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,14 @@ func httpACUserInteractive(jci *jiraCloudInstance, w http.ResponseWriter, r *htt
Notifications: true,
},
}

mattermostUserId := r.Header.Get("Mattermost-User-ID")
if mattermostUserId == "" {
siteURL := jci.Plugin.GetSiteURL()
return http.StatusUnauthorized, errors.New(
`Mattermost failed to recognize your user account. ` +
`Please make sure third-party cookies are not disabled in your browser settings.`)
`Please make sure third-party cookies are not disabled in your browser settings. ` +
`Make sure you are signed into Mattermost on ` + siteURL + `.`)
}

requestedUserId, secret, err := jci.Plugin.ParseAuthToken(mmToken)
Expand Down

0 comments on commit d1c74e3

Please sign in to comment.