fix(stage-pocket,stage-server): correct Android deep link scheme (#1794)

This commit is contained in:
hahaqwq
2026-05-08 20:48:55 +08:00
committed by GitHub
parent bbaf0c99f6
commit 4ecd51076d
4 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -11,7 +11,7 @@ function getOriginFromUrl(url: string): string | undefined {
const TRUSTED_EXACT_ORIGINS = [
'capacitor://localhost', // Capacitor mobile (iOS)
'ai.moeru.airi_pocket://links', // Android deep link
'ai.moeru.airi-pocket://links', // Android deep link
'https://airi.moeru.ai', // Production
]
@@ -26,7 +26,7 @@
<!-- Custom Protocol Configuration -->
<data
android:scheme="ai.moeru.airi_pocket"
android:scheme="ai.moeru.airi-pocket"
android:host="links" />
</intent-filter>
</activity>
+1 -1
View File
@@ -12,7 +12,7 @@ export function installDeepLinks(router: Router): void {
try {
const url = new URL(event.url)
if (url.host === 'localhost' && url.pathname === '/auth/callback') {
if (url.host === 'links' && url.pathname === '/auth/callback') {
const code = url.searchParams.get('code')
const state = url.searchParams.get('state')
if (!code || !state) {
+1 -1
View File
@@ -30,7 +30,7 @@ function getRedirectOrigin() {
// 2. Handle Android Native (Capacitor) environment
if (isAndroidNative) {
return 'ai.moeru.airi_pocket://links'
return 'ai.moeru.airi-pocket://links'
}
// 3. Handle standard browser environment