* Add openidconnect authentication demo * use_atom_ref usage to have a read/write handle on the atom * Use default * Code rewrite to better reflect the authentication flow * Use the env macro instead of the build.rs to load env variables * Add env variables * Remove unnecessary dependency * Add env variables to the root workspace * Update readme * Bump openidconnect version * Use props to pass the client to the child components * Code clean up --------- Co-authored-by: Truong Tan Dat <truongt@igbmc.fr>
18 lines
480 B
Rust
18 lines
480 B
Rust
use crate::views::{header::AuthHeader, home::Home, login::Login, not_found::NotFound};
|
|
use dioxus::prelude::*;
|
|
use dioxus_router::prelude::*;
|
|
|
|
#[derive(Routable, Clone)]
|
|
pub enum Route {
|
|
#[layout(AuthHeader)]
|
|
#[route("/")]
|
|
Home {},
|
|
|
|
// https://dioxuslabs.com/learn/0.4/router/reference/routes#query-segments
|
|
#[route("/login?:query_string")]
|
|
Login { query_string: String },
|
|
#[end_layout]
|
|
#[route("/:..route")]
|
|
NotFound { route: Vec<String> },
|
|
}
|