Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,27 @@ rust-version = "1.85"

[dependencies]
async-trait = "0.1"
gloo-storage = "0.3"
gloo-timers = "0.3"
gloo-utils = "0.2"
gloo-storage = "0.4"
gloo-timers = "0.4"
gloo-utils = "0.3"
js-sys = "0.3"
log = "0.4"
num-traits = "0.2"
oauth2 = "5.0.0"
reqwest = "0.12.22"
reqwest = "0.13.4"
serde = { version = "1", features = ["derive"] }
time = { version = "0.3", features = ["wasm-bindgen"] }
tokio = { version = "1", features = ["sync"] }
wasm-bindgen = "0.2"
wasm-bindgen-futures = "0.4"
yew = "0.22.0"
yew = "0.23"

web-sys = { version = "0.3", features = [
"Window",
] }

openidconnect = { version = "4.0.1", optional = true, features = ["timing-resistant-secret-traits"] }
yew-nested-router = { version = "0.8.0", optional = true }
yew-nested-router = { version = "0.9.0", optional = true }

[features]
# Enable for OpenID Connect support
Expand Down
6 changes: 4 additions & 2 deletions src/components/context/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,11 @@ impl<C: Client> Component for OAuth2<C> {
fn view(&self, ctx: &Context<Self>) -> Html {
html!(
<>
<ContextProvider<OAuth2Context> context={self.context.clone()} >
<ContextProvider<OAuth2Context> context={self.context.clone()}>
<ContextProvider<AgentContext<C>> context={self.agent.clone()}>
<ContextProvider<LatestAccessToken> context={self.latest_access_token.clone()}>
<ContextProvider<LatestAccessToken>
context={self.latest_access_token.clone()}
>
{ for ctx.props().children.iter() }
</ContextProvider<LatestAccessToken>>
</ContextProvider<AgentContext<C>>>
Expand Down
12 changes: 2 additions & 10 deletions src/components/failure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,7 @@ pub fn failure(props: &FailureProps) -> Html {
None => missing_context(),
Some(OAuth2Context::Failed(..)) => {
html!(
<@{element}
id={ props.id.clone() }
style={ props.style.clone() }
class={ &props.class }
>
<@{element} id={props.id.clone()} style={props.style.clone()} class={&props.class}>
{ for props.children.iter() }
</@>
)
Expand Down Expand Up @@ -64,11 +60,7 @@ pub fn failure_message(props: &FailureMessageProps) -> Html {
None => missing_context(),
Some(OAuth2Context::Failed(message)) => {
html!(
<@{element}
id={ props.id.clone() }
style={ props.style.clone() }
class={ &props.class }
>
<@{element} id={props.id.clone()} style={props.style.clone()} class={&props.class}>
{ message }
</@>
)
Expand Down
6 changes: 5 additions & 1 deletion src/components/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,9 @@ pub use use_authentication::*;
use yew::prelude::*;

fn missing_context() -> Html {
html!(<div> { "Unable to find OAuth2 context! This element needs to be wrapped into an `OAuth2` component somewhere in the hierarchy"} </div>)
html!(
<div>
{ "Unable to find OAuth2 context! This element needs to be wrapped into an `OAuth2` component somewhere in the hierarchy" }
</div>
)
}
6 changes: 3 additions & 3 deletions yew-oauth2-example/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ edition = "2024"
[dependencies]
yew-oauth2 = { path = ".." }

gloo-timers = "0.3"
gloo-timers = "0.4"
humantime = "2"
log = { version = "0.4", features = [] }
serde_json = "1"
time = "0.3"
wasm-bindgen = "0.2.92"
wasm-logger = "0.2"
yew = { version = "0.22.0", features = ["csr"] }
yew-nested-router = "0.8.0"
yew = { version = "0.23.0", features = ["csr"] }
yew-nested-router = "0.9.0"

openidconnect = { version = "4", optional = true }

Expand Down
6 changes: 3 additions & 3 deletions yew-oauth2-redirect-example/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ edition = "2024"
[dependencies]
yew-oauth2 = { path = "..", features = ["yew-nested-router"] }

gloo-timers = "0.3"
gloo-timers = "0.4"
humantime = "2"
log = { version = "0.4", features = [] }
serde_json = "1"
time = "0.3"
wasm-bindgen = "0.2.92"
wasm-logger = "0.2"
yew = { version = "0.22.0", features = ["csr"] }
yew-nested-router = "0.8.0"
yew = { version = "0.23.0", features = ["csr"] }
yew-nested-router = "0.9.0"

openidconnect = { version = "4", optional = true }

Expand Down
Loading