diff --git a/components/user/UserSignIn.vue b/components/user/UserSignIn.vue
index e1dac0c8..9bee4edd 100644
--- a/components/user/UserSignIn.vue
+++ b/components/user/UserSignIn.vue
@@ -110,7 +110,7 @@ onMounted(async () => {
{
- const { server } = getRouterParams(event)
+ let { server } = getRouterParams(event)
+ server = server.toLocaleLowerCase().trim()
const app = await getApp(server)
if (!app) {
diff --git a/server/api/[server]/oauth.ts b/server/api/[server]/oauth.ts
index d9159cbe..62395141 100644
--- a/server/api/[server]/oauth.ts
+++ b/server/api/[server]/oauth.ts
@@ -3,7 +3,8 @@ import { createError, defineEventHandler, getQuery, getRouterParams, sendRedirec
import { getApp, getRedirectURI } from '~/server/shared'
export default defineEventHandler(async (event) => {
- const { server } = getRouterParams(event)
+ let { server } = getRouterParams(event)
+ server = server.toLocaleLowerCase().trim()
const app = await getApp(server)
if (!app) {
diff --git a/server/shared.ts b/server/shared.ts
index 98444e53..db7c4f6f 100644
--- a/server/shared.ts
+++ b/server/shared.ts
@@ -73,7 +73,7 @@ export async function listServers() {
continue
const id = key.split(':').pop()!.replace(/\.json$/, '')
if (id)
- servers.add(id)
+ servers.add(id.toLocaleLowerCase())
}
return Array.from(servers).sort()
}