Tony/move client profile#47
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR aims to fix Solid-OIDC login issues in the Flutter example app by introducing a hosted client identifier document and a web redirect handler, and by updating runtime redirect URI selection to better match platform needs (web vs native vs desktop).
Changes:
- Add
client-profile.jsonldand a webredirect.htmlpage to support Solid-OIDC redirect / logout flows. - Update the example app’s redirect URI configuration to be derived per-platform at runtime.
- Add macOS Xcode project files / entitlements and pin Chrome runs to port 4400.
Reviewed changes
Copilot reviewed 11 out of 12 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| support/flutter.mk | Runs Chrome on a fixed web port (4400) to align with loopback redirect URIs. |
| example/web/redirect.html | Adds a redirect/logout relay page for OIDC web flows (BroadcastChannel + localStorage). |
| example/test/widget_test.dart | Removes the (commented-out) default widget test scaffold. |
| example/macos/Runner/Release.entitlements | Adds macOS release entitlements for sandbox/network/keychain (and currently JIT/server). |
| example/macos/Runner/DebugProfile.entitlements | Adds macOS debug entitlements for sandbox/network/keychain (and currently JIT/server). |
| example/macos/Runner.xcodeproj/xcuserdata/intony.xcuserdatad/xcschemes/xcschememanagement.plist | Adds user-specific Xcode scheme state. |
| example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme | Adds a shared Xcode scheme for the macOS runner project. |
| example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist | Adds Xcode workspace check metadata. |
| example/macos/Runner.xcodeproj/project.pbxproj | Adds macOS Xcode project configuration (currently includes a hard-coded DEVELOPMENT_TEAM). |
| example/lib/screens/LoginScreen.dart | Introduces per-platform redirect URI selection and wires it into SolidOidcConfig. |
| example/client-profile.jsonld | Adds a Solid-OIDC client identifier document with redirect and post-logout URIs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+52
to
+54
| if (kIsWeb) { | ||
| return '${Uri.base.origin}/redirect.html'; | ||
| } |
Comment on lines
+3
to
+8
| "client_id": "https://anushkavidanage.github.io/solid_auth/example_app/client-profile.jsonld", | ||
| "client_name": "Flutter Solid Authentication", | ||
| "application_type": "native", | ||
| "redirect_uris": [ | ||
| "https://anushkavidanage.github.io/solid_auth/example_app/redirect.html", | ||
| "com.example.solidautheg://redirect", |
Comment on lines
+53
to
+59
| setLocalStorage(stateResponseNamespace, state, window.location.toString()); | ||
| //we call JSON.parse twice, since shared_preferences double encodes json strings for some reason. | ||
| const parsedStateString = JSON.parse(stateDataRaw); | ||
| if (!parsedStateString) { | ||
| console.error('parsed state is null'); | ||
| return; | ||
| } |
Comment on lines
+101
to
+114
| function setLocalStorage(namespace, key, value) { | ||
| const keysEntryKey = 'oidc.keys.' + namespace; | ||
| var keys = localStorage.getItem(keysEntryKey); | ||
| if (!keys) { | ||
| keys = "[]"; | ||
| } | ||
| const parsedKeys = JSON.parse(keys); | ||
| if (!(parsedKeys instanceof Array)) { | ||
| console.error('parsedKeys is not an array.', parsedKeys); | ||
| } | ||
| parsedKeys.push(key); | ||
| localStorage.setItem(keysEntryKey, JSON.stringify(parsedKeys)); | ||
| localStorage.setItem('oidc.' + namespace + '.' + key, value); | ||
| } |
Comment on lines
+69
to
+75
| const original_uri = parsedStateString.original_uri; | ||
| if (!original_uri) { | ||
| console.warn("it's preferred that original_uri is used when webLaunchMode is samePage."); | ||
| return; | ||
| } | ||
| window.location.assign(original_uri); | ||
| } |
Comment on lines
+1
to
+5
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
| <plist version="1.0"> | ||
| <dict> | ||
| <key>SchemeUserState</key> |
| "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development"; | ||
| CODE_SIGN_STYLE = Automatic; | ||
| COMBINE_HIDPI_IMAGES = YES; | ||
| DEVELOPMENT_TEAM = G7843T3SD3; |
| "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development"; | ||
| CODE_SIGN_STYLE = Automatic; | ||
| COMBINE_HIDPI_IMAGES = YES; | ||
| DEVELOPMENT_TEAM = G7843T3SD3; |
| "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development"; | ||
| CODE_SIGN_STYLE = Automatic; | ||
| COMBINE_HIDPI_IMAGES = YES; | ||
| DEVELOPMENT_TEAM = G7843T3SD3; |
Comment on lines
+7
to
+12
| <key>com.apple.security.cs.allow-jit</key> | ||
| <true/> | ||
| <key>com.apple.security.network.server</key> | ||
| <true/> | ||
| <key>com.apple.security.network.client</key> | ||
| <true/> |
gjwgit
approved these changes
Jul 10, 2026
gjwgit
left a comment
Contributor
There was a problem hiding this comment.
All changes are in example. Merging and releasing. Createing solidautheg repository to host the client and redirect.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Details
Description
Fixed the login issues.
Please upload client-profile.jsonld to https://anusii.github.io/solidautheg/client-profile.jsonld
Please upload redirect.html to https://anusii.github.io/solidautheg/redirect.html
Related Issues
Type of Change
How To Test?
Run the app, and then login.
Checklist
make preporflutter analyze lib)dart testoutput or screenshot included in issue #Finalising