fix: normalize suggested username

oauth providers can be less strict

Signed-off-by: Hugo Renard <hugo.renard@protonmail.com>
This commit is contained in:
Hugo Renard 2023-09-18 14:55:23 +02:00
parent 8324a7b4a7
commit 4960387174
No known key found for this signature in database
GPG Key ID: 3A285FD470209C59

View File

@ -178,7 +178,7 @@ onBeforeMount(() => {
const username = getValueFromMeta("auth-user-suggested-actor-username"); const username = getValueFromMeta("auth-user-suggested-actor-username");
const name = getValueFromMeta("auth-user-suggested-actor-name"); const name = getValueFromMeta("auth-user-suggested-actor-name");
if (username) { if (username) {
identity.value.preferredUsername = username; identity.value.preferredUsername = convertToUsername(username);
} }
if (name) { if (name) {
identity.value.name = name; identity.value.name = name;