pub fn ForgeAuthProvider(_: ForgeAuthProviderProps) -> ElementExpand description
Provider component that sets up auth state, ForgeClient with auto token wiring, 401 detection, and periodic refresh.
ⓘ
ForgeAuthProvider {
url: "http://localhost:9081",
app_name: "my-app",
children: rsx! { Router::<Route> {} }
}refresh_interval_secs: How often to proactively refresh tokens (default: 2400 = 40 min).
Set to roughly 2/3 of your access_token_ttl from forge.toml.
§Props
For details, see the props struct definition.
url:Stringapp_name:Stringrefresh_interval_secs:u64on_mutation_error:Option<EventHandler<crate::ForgeClientError>>children:Element