Open
Conversation
- Add NoteBookmark.MauiApp project targeting net10.0-android
- Implement IAuthService with OIDC login via WebAuthenticator + PKCE
- KeycloakAuthService: token exchange, SecureStorage persistence,
silent refresh, offline/expired detection
- Login.razor page with session-expired-offline message
- Home.razor post-login page: Hello {username} + Sign out button
- Routes.razor wires in NoteBookmark.SharedUI.PostNoteClient assembly
- Android intent filter for notebookmark://auth/callback redirect
- MSBuild target strips Microsoft.AspNetCore.App transitive
FrameworkReference on Android (NETSDK1082 workaround)
- Placeholder Keycloak config in wwwroot/appsettings.json
- Added to NoteBookmark.sln and Directory.Packages.props
Co-authored-by: Copilot <[email protected]>
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.
Summary
Implements the
NoteBookmark.MauiAppMAUI Blazor Hybrid project with Keycloak OIDC authentication.What's in this PR
NoteBookmark.MauiAppproject —net10.0-android, added to solutionNoteBookmark.SharedUI+NoteBookmark.DomainreferencedIAuthService— contract: Login, Logout, GetAccessToken (silent refresh), IsAuthenticated, InitializeKeycloakAuthService— OIDC viaWebAuthenticator+ PKCE (RFC 7636), token exchange via HttpClient,SecureStoragepersistenceApp.xaml.cs: loads tokens on start, silent refresh if expired and onlineLogin.razor— sign-in page, surfaces offline/expired messageHome.razor— post-login placeholder: "Hello, {username}" + Sign out buttonRoutes.razor— includesNoteBookmark.SharedUI.PostNoteClient.Assemblyin additional assembliesnotebookmark://auth/callbackfor WebAuthenticator redirectwwwroot/appsettings.json(Frank to fill in real values)Key implementation notes
SHA256+ base64url (no extra NuGet dep)auth_access_token,auth_refresh_token,auth_token_expiryRemoveAspNetCoreFrameworkReferenceForAndroidstrips the transitiveMicrosoft.AspNetCore.AppFrameworkReference on Android targets (NETSDK1082 workaround; see csproj comment)dotnet build ... -f net10.0-android -r android-arm64→ 0 errors, 2 pre-existing NU1510 warningsCloses #120