Skip to content

Commit 2dd47e7

Browse files
authored
Fixed the Return to Schuly deep link to key on clientId instead of a rejected custom-scheme baseUrl (#75)
1 parent 6bb7a51 commit 2dd47e7

2 files changed

Lines changed: 5 additions & 7 deletions

File tree

keycloakify/src/login/pages/info/Page.tsx

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,13 @@ export function Page() {
6262
return null;
6363
}
6464

65-
const baseUrl = kcContext.client.baseUrl;
66-
// App deep link (e.g. schuly://): after a cross-browser action
67-
// like email verification there's no flow to resume in this
68-
// browser, so send the user straight back to the app.
69-
if (baseUrl !== undefined && !/^https?:\/\//i.test(baseUrl)) {
65+
// Mobile app client: after a cross-browser action like email
66+
// verification there's no flow to resume here, and Keycloak
67+
// rejects custom-scheme client URLs - so deep-link back to the app.
68+
if (kcContext.client.clientId === "schuly-app") {
7069
return (
7170
<Button type="button" className="w-full">
72-
<a href={baseUrl}>Return to Schuly</a>
71+
<a href="schuly://">Return to Schuly</a>
7372
</Button>
7473
);
7574
}

realms/schuly-realm.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,6 @@
276276
"clientId": "schuly-app",
277277
"name": "Schuly App",
278278
"description": "Public OIDC client for the Schuly mobile app (PKCE).",
279-
"baseUrl": "schuly://",
280279
"enabled": true,
281280
"publicClient": true,
282281
"standardFlowEnabled": true,

0 commit comments

Comments
 (0)