diff --git a/.lycheeignore b/.lycheeignore index 9994894..3ed4b38 100644 --- a/.lycheeignore +++ b/.lycheeignore @@ -87,11 +87,8 @@ https://github.com/gjwgit/myapp/blob/main/README.md https://server/POD_NAME/APP_NAME/data/FILE_PATH https://host/ https://pods.au/me/app/data -https://github.com/anusii/mypod/blob/dev/CHANGELOG.md -https://anusii.github.io/mypod/ -https://anusii.github.io/mypod/client-profile.jsonld -https://anusii.github.io/mypod/redirect.html https://your-solid-server/ +https://gjwgit.github.io/rolopod/client-profile.jsonld # 20260605 gjw Failing solid servers diff --git a/client-profile.jsonld b/client-profile.jsonld new file mode 100644 index 0000000..9cfbb69 --- /dev/null +++ b/client-profile.jsonld @@ -0,0 +1,25 @@ +{ + "@context": "https://www.w3.org/ns/solid/oidc-context.jsonld", + "client_id": "https://gjwgit.github.io/rolopod/client-profile.jsonld", + "client_name": "RoloPod", + "application_type": "native", + "redirect_uris": [ + "https://rolopod.solidcommunity.au/redirect.html", + "com.togaware.rolopod://redirect", + "http://localhost:4400/redirect.html" + ], + "post_logout_redirect_uris": [ + "https://rolopod.solidcommunity.au/redirect.html", + "com.togaware.rolopod://redirect", + "http://localhost:4400/redirect.html" + ], + "scope": "openid profile offline_access webid", + "grant_types": [ + "authorization_code", + "refresh_token" + ], + "response_types": [ + "code" + ], + "token_endpoint_auth_method": "none" +} diff --git a/lib/main.dart b/lib/main.dart index 7600eb0..6ee9b25 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -25,6 +25,7 @@ library; +import 'package:flutter/foundation.dart' show kIsWeb; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; @@ -103,13 +104,13 @@ class _RoloPodAppState extends State { image: const AssetImage('assets/images/app_image.jpg'), logo: const AssetImage('assets/images/app_icon.png'), link: 'https://github.com/gjwgit/rolopod', - clientId: - 'https://solidcommunity.au/apps/rolopod/client-profile.jsonld', - redirectUris: [ - 'http://localhost:4400/redirect', - 'com.togaware.rolopod://redirect', - 'https://solidcommunity.au/apps/rolopod/redirect.html', - ], + clientId: 'https://gjwgit.github.io/rolopod/client-profile.jsonld', + redirectUris: kIsWeb + ? ['${Uri.base.origin}/redirect.html'] + : const [ + 'com.togaware.rolopod://redirect', + 'http://localhost:4400/redirect.html', + ], child: const AppScaffold(), ), ); diff --git a/macos/Runner/DebugProfile.entitlements b/macos/Runner/DebugProfile.entitlements index dddb8a3..1b92f1d 100644 --- a/macos/Runner/DebugProfile.entitlements +++ b/macos/Runner/DebugProfile.entitlements @@ -8,5 +8,13 @@ com.apple.security.network.server + com.apple.security.network.client + + keychain-access-groups + + com.apple.security.keychain + + com.apple.security.files.user-selected.read-write + diff --git a/macos/Runner/Release.entitlements b/macos/Runner/Release.entitlements index 852fa1a..1b92f1d 100644 --- a/macos/Runner/Release.entitlements +++ b/macos/Runner/Release.entitlements @@ -4,5 +4,17 @@ com.apple.security.app-sandbox + com.apple.security.cs.allow-jit + + com.apple.security.network.server + + com.apple.security.network.client + + keychain-access-groups + + com.apple.security.keychain + + com.apple.security.files.user-selected.read-write + diff --git a/support/flutter.mk b/support/flutter.mk index 3656594..8ecda07 100644 --- a/support/flutter.mk +++ b/support/flutter.mk @@ -102,7 +102,7 @@ LOC := $(shell if [ -f support/loc.sh ]; then echo support/loc.sh; \ .PHONY: chrome chrome: - flutter run -d chrome --release + flutter run -d chrome --release --web-port=4400 # 20220503 gjw The following fails if the target files already exist - # just needs to be run once. diff --git a/web/callback.html b/web/callback.html deleted file mode 100644 index b7fe4ba..0000000 --- a/web/callback.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - diff --git a/web/redirect.html b/web/redirect.html new file mode 100644 index 0000000..3d64b43 --- /dev/null +++ b/web/redirect.html @@ -0,0 +1,122 @@ + + + + + + + Flutter Oidc Redirect + + + + + +

Authentication completed! Please close this page.

+ + +