fix: redirect from netlify

This commit is contained in:
Julien Calixte
2026-03-10 12:37:15 +01:00
parent 8843d67a80
commit a234d590bd
3 changed files with 16 additions and 3 deletions

View File

@@ -7,6 +7,17 @@ from = "/.well-known/*"
to = "/.well-known/:splat" to = "/.well-known/:splat"
status = 200 status = 200
[[headers]]
for = "/client-metadata.json"
[headers.values]
Access-Control-Allow-Origin = "*"
Content-Type = "application/json"
[[redirects]]
from = "/client-metadata.json"
to = "/client-metadata.json"
status = 200
[[redirects]] [[redirects]]
from = "/*" from = "/*"
to = "/" to = "/"

View File

@@ -3,8 +3,7 @@
"client_name": "Remanso", "client_name": "Remanso",
"client_uri": "https://remanso.space", "client_uri": "https://remanso.space",
"redirect_uris": [ "redirect_uris": [
"https://remanso.space/", "https://remanso.space/"
"http://localhost:5173/"
], ],
"scope": "atproto transition:generic", "scope": "atproto transition:generic",
"grant_types": ["authorization_code", "refresh_token"], "grant_types": ["authorization_code", "refresh_token"],

View File

@@ -8,7 +8,10 @@ let clientPromise: Promise<BrowserOAuthClient> | null = null
export const getOAuthClient = (): Promise<BrowserOAuthClient> => { export const getOAuthClient = (): Promise<BrowserOAuthClient> => {
if (!clientPromise) { if (!clientPromise) {
clientPromise = BrowserOAuthClient.load({ clientId: CLIENT_ID }) clientPromise = BrowserOAuthClient.load({
clientId: CLIENT_ID,
handleResolver: 'https://bsky.social',
})
} }
return clientPromise return clientPromise
} }