Skip to main content

ForgeAuthProvider

Function ForgeAuthProvider 

Source
pub fn ForgeAuthProvider(_: ForgeAuthProviderProps) -> Element
Expand 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.