summaryrefslogtreecommitdiffstats
path: root/rust/src
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2019-06-07 15:07:49 -0700
committerBryan Newbold <bnewbold@robocracy.org>2019-06-07 15:07:49 -0700
commit651c1a7acf4a141408e7fde670c8f03e2228414b (patch)
tree15d7b9c49885763888e25dded0a22d6a2eb45266 /rust/src
parentdb33b774c8c12a79e3ce36f4b67173d6ff4fcde0 (diff)
downloadfatcat-651c1a7acf4a141408e7fde670c8f03e2228414b.tar.gz
fatcat-651c1a7acf4a141408e7fde670c8f03e2228414b.zip
truncated oidc username creation
Diffstat (limited to 'rust/src')
-rw-r--r--rust/src/endpoint_handlers.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/rust/src/endpoint_handlers.rs b/rust/src/endpoint_handlers.rs
index 4253af45..59bc0519 100644
--- a/rust/src/endpoint_handlers.rs
+++ b/rust/src/endpoint_handlers.rs
@@ -596,7 +596,8 @@ impl Server {
let (editor_row, created): (EditorRow, bool) = match existing.first() {
Some((editor, _)) => (editor.clone(), false),
None => {
- let username = format!("{}-{}", params.preferred_username, params.provider);
+ let username = format!("{}-{}", params.preferred_username, params.provider)
+ .truncate(24);
let editor = Editor {
editor_id: None,
username: username,