diff --git a/.lycheeignore b/.lycheeignore
index 76d4fe3..2821f58 100644
--- a/.lycheeignore
+++ b/.lycheeignore
@@ -15,6 +15,7 @@ https://your-domain/redirect.html
# Localhost used in comments
http://localhost:3000/
+http://localhost:4400/
# POD OAuth endpoints that require authentication parameters
diff --git a/client-profile.jsonld b/client-profile.jsonld
index 815d336..8b017b7 100644
--- a/client-profile.jsonld
+++ b/client-profile.jsonld
@@ -1,17 +1,17 @@
{
"@context": "https://www.w3.org/ns/solid/oidc-context.jsonld",
- "client_id": "https://solidcommunity.au/apps/geopod/client-profile.jsonld",
+ "client_id": "https://gjwgit.github.io/geopod/client-profile.jsonld",
"client_name": "GeoPod",
"application_type": "native",
"redirect_uris": [
"https://geopod.solidcommunity.au/redirect.html",
"com.togaware.geopod://redirect",
- "http://localhost:4400/redirect"
+ "http://localhost:4400/redirect.html"
],
"post_logout_redirect_uris": [
"https://geopod.solidcommunity.au/redirect.html",
"com.togaware.geopod://redirect",
- "http://localhost:4400/redirect"
+ "http://localhost:4400/redirect.html"
],
"scope": "openid profile offline_access webid",
"grant_types": [
diff --git a/lib/app.dart b/lib/app.dart
index 56439f2..59547e3 100644
--- a/lib/app.dart
+++ b/lib/app.dart
@@ -27,6 +27,7 @@ library;
import 'dart:async';
+import 'package:flutter/foundation.dart' show kIsWeb;
import 'package:flutter/material.dart';
import 'package:solidpod/solidpod.dart' show registerLogoutCacheCallback;
@@ -70,12 +71,20 @@ class App extends StatelessWidget {
'encrypted_data',
'places',
],
- clientId: 'https://solidcommunity.au/apps/geopod/client-profile.jsonld',
- redirectUris: [
- 'https://geopod.solidcommunity.au/redirect.html',
- 'com.togaware.geopod://redirect',
- 'http://localhost:4400/redirect',
- ],
+ clientId: 'https://gjwgit.github.io/geopod/client-profile.jsonld',
+ // On web the redirect must be same-origin as where the app is served,
+ // otherwise redirect.html's BroadcastChannel cannot hand the auth
+ // response back and login hangs on the spinner. solidpod's
+ // pickRedirectUri simply takes the first https:// entry (it does not
+ // match on origin), so we derive the web entry from Uri.base.origin:
+ // the deployed https host in production, and http://localhost:4400
+ // under `flutter run -d chrome --web-port=4400`.
+ redirectUris: kIsWeb
+ ? ['${Uri.base.origin}/redirect.html']
+ : const [
+ 'com.togaware.geopod://redirect',
+ 'http://localhost:4400/redirect.html',
+ ],
child: appWithPreload,
);
diff --git a/macos/Runner/DebugProfile.entitlements b/macos/Runner/DebugProfile.entitlements
index 159e5ed..1912118 100644
--- a/macos/Runner/DebugProfile.entitlements
+++ b/macos/Runner/DebugProfile.entitlements
@@ -10,12 +10,9 @@
Authentication complete. You can close this window.
-If this window does not close automatically, please close it manually.
- - - -