Commit graph

3 commits

Author SHA1 Message Date
bed9c8a272 fixes the compile and timestamps to db 2026-07-11 03:26:13 +01:00
9e272a8147 PostIt: drop LoginPage, hoist Login into session banner, drop AuthorId field
Login flow no longer needs a dedicated page. The OIDC interactive
login now lives on the persistent SessionStatusBanner, alongside
'Se déconnecter', driven by a new SessionStatusViewModel.LoginAsync
command. On success the VM raises LoginSucceeded and App.axaml.cs
pushes MainPage on top of HomePage — same path BootAsync already
takes when the silent refresh succeeds at boot, so the two flows
can't drift apart (PushMainPageAsync helper, single source of
truth).

MainPage no longer shows an editable AuthorId field: the server
infers the author from the bearer token, so the client-side
control was misleading at best. The detail grid drops from 5 rows
to 4.

Removed:
  - Views/LoginPage.axaml + .axaml.cs
  - ViewModels/LoginPageViewModel.cs
  - HomePage Login button + OnLoginClick code-behind
  - DI registrations for LoginPage / LoginPageViewModel
  - ViewLocator mapping
  - dangling <c>LoginPage*</c> cref / comments in Platform.cs,
    PlatformBootstrap.cs (Desktop + Android), MainWindow.axaml,
    YavscApiClient.cs
2026-07-07 20:47:00 +01:00
c172d1cf9e PostIt.Android: drive the PKCE flow through Chrome Custom Tabs
The earlier commit removed the client_secret and wired
MainActivity.OnNewIntent to AndroidOidcCallbackSink, but
IdentityModel.OidcClient.LoginAsync still had no IBrowser to drive
the user-agent half of the flow. Without it, the desktop / browser
projects continue to fail at login with 'No browser is available'.

Android now plugs in Chrome Custom Tabs:

  * PostIt.Android/Services/AndroidSystemBrowser.cs implements
    IBrowser.InvokeAsync using CustomTabsIntent.LaunchUrl and waits
    for MainActivity.AndroidOidcCallbackSink to deliver the deep-link
    Intent (android://postit-signin?code=...&state=...).
  * PostIt/Services/Platform.cs is a tiny static indirection the
    shared library uses to ask the running platform for an
    IBrowser and the appropriate default RedirectUri, without
    referencing any UI framework from the shared assembly.
  * LoginPageViewModel reads Platform.DefaultRedirectUri and
    Platform.CreateBrowser().Invoke() before calling LoginAsync.
  * PostIt.Android/PlatformBootstrap.cs wires the Android side at
    startup, and MainActivity.OnCreate calls EnsureInitialized().
  * Xamarin.AndroidX.Browser 1.8.0 added to the central package
    versions so CustomTabsIntent resolves.
2026-06-20 17:26:13 +01:00