Skip to content

armgit / memos

Public Imported from GitHub
0

Memos is an open-source, self-hosted note-taking app that brings your everyday thoughts together in a personal timeline. Your data stays yours, and you choose what to keep private or share.

fix: Update SSO login flow to encode redirect_uri (#5006)

Amazingcaa3add85c9593
diff --git a/web/src/pages/SignIn.tsx b/web/src/pages/SignIn.tsx
index 76528ed8a..00e968559 100644
--- a/web/src/pages/SignIn.tsx
+++ b/web/src/pages/SignIn.tsx
@@ -48,7 +48,7 @@ const SignIn = observer(() => {
}
const authUrl = `${oauth2Config.authUrl}?client_id=${
oauth2Config.clientId
- }&redirect_uri=${redirectUri}&state=${stateQueryParameter}&response_type=code&scope=${encodeURIComponent(
+ }&redirect_uri=${encodeURIComponent(redirectUri)}&state=${stateQueryParameter}&response_type=code&scope=${encodeURIComponent(
oauth2Config.scopes.join(" "),
)}`;
window.location.href = authUrl;