True if the current URL looks like an authorization response for this app.
Call on the return page. Validates state, exchanges the code (PKCE, no secret) and loads the profile.
Resolves with the user and the returnTo passed to signIn.
Throws AccessDenied / StateMismatch / UnetIdError / NetworkError.
Load a previous session (call once on startup). Returns null if signed out.
Re-reads the profile from UNET (e.g. after the user changed their name elsewhere).
Scopes the server granted for this session; null if signed out. Falls back to the requested scopes if the server did not say.
Whether the session has scope — check before calling, instead of catching InsufficientScope.
A valid access token, refreshed automatically (single in-flight refresh).
Revokes tokens on the server (best effort) and clears local state.
Redirects the browser to unet.social. Finish with
handleRedirectCallback()on the return page.