You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Trying to convert to OIDC, but the email does not match.
1249
1250
// So do not make a new user, just block the request.
1250
1251
ifuser.ID==uuid.Nil {
1251
-
returnhttpError{
1252
+
returndatabase.User{}, httpError{
1252
1253
code: http.StatusBadRequest,
1253
1254
msg: fmt.Sprintf("The oidc account with the email %q does not match the email of the account you are trying to convert. Contact your administrator to resolve this issue.", params.Email),
1254
1255
}
@@ -1260,13 +1261,13 @@ func (api *API) convertUserToOauth(ctx context.Context, r *http.Request, db data
1260
1261
StateString: params.State.StateString,
1261
1262
})
1262
1263
ifxerrors.Is(err, sql.ErrNoRows) {
1263
-
returnhttpError{
1264
+
returndatabase.User{}, httpError{
1264
1265
code: http.StatusBadRequest,
1265
1266
msg: "No convert login request found with given state. Restart the convert process and try again.",
1266
1267
}
1267
1268
}
1268
1269
iferr!=nil {
1269
-
returnhttpError{
1270
+
returndatabase.User{}, httpError{
1270
1271
code: http.StatusInternalServerError,
1271
1272
msg: err.Error(),
1272
1273
}
@@ -1288,7 +1289,7 @@ func (api *API) convertUserToOauth(ctx context.Context, r *http.Request, db data
1288
1289
1289
1290
// If we do not allow converting to oauth, return an error.
1290
1291
if!params.OauthConversionEnabled {
1291
-
returnhttpError{
1292
+
returndatabase.User{}, httpError{
1292
1293
code: http.StatusForbidden,
1293
1294
msg: fmt.Sprintf("Incorrect login type, attempting to use %q but user is of login type %q",
1294
1295
params.LoginType,
@@ -1301,7 +1302,7 @@ func (api *API) convertUserToOauth(ctx context.Context, r *http.Request, db data
1301
1302
// It needs to have the correct login type information for this
0 commit comments