actually fix localhost client support #4

merged
opened by nel.pet targeting main from nel.pet/tranquil: main
Changed files
+3 -2
frontend
src
lib
src
oauth
+1 -1
frontend/src/lib/oauth.ts
··· 9 9 ].join(' ') 10 10 const CLIENT_ID = !(import.meta.env.DEV) 11 11 ? `${window.location.origin}/oauth/client-metadata.json` 12 - : `http://localhost/oauth/client-metadata.json?scope=${SCOPES}` 12 + : `http://localhost/?scope=${SCOPES}` 13 13 const REDIRECT_URI = `${window.location.origin}/` 14 14 15 15 interface OAuthState {
+2 -1
src/oauth/client.rs
··· 91 91 url.scheme() == "http" 92 92 && url.host_str() == Some("localhost") 93 93 && url.port().is_none() 94 - && url.path().is_empty() 94 + // empty path 95 + && url.path() == "/" 95 96 } else { 96 97 false 97 98 }