From b5a38efd2853f2cd81a7875b5a1ff4d41edef086 Mon Sep 17 00:00:00 2001 From: Matt Baer Date: Thu, 16 Jan 2020 14:09:42 -0500 Subject: [PATCH] Fall back to username as coll title on OAuth signup This uses the given username as the Display Name / Collection Title if a user doesn't give one -- as might happen when authenticating with Write.as. Ref T712 --- oauth_signup.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oauth_signup.go b/oauth_signup.go index 5b960ca..d1fa9b5 100644 --- a/oauth_signup.go +++ b/oauth_signup.go @@ -133,7 +133,7 @@ func (h oauthHandler) validateOauthSignup(r *http.Request) error { } collTitle := r.FormValue(oauthParamAlias) if len(collTitle) == 0 { - return impart.HTTPError{Status: http.StatusBadRequest, Message: "Display name is too short."} + collTitle = username } password := r.FormValue("password") if len(password) == 0 {