Skip to content

Commit

Permalink
Add Secure flag to state cookie
Browse files Browse the repository at this point in the history
  • Loading branch information
atezet committed Dec 6, 2023
1 parent 2e2464e commit c7ece2e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
//! cookies.add_private(
//! Cookie::build("token", token.access_token().to_string())
//! .same_site(SameSite::Lax)
//! .secure(true)
//! .finish()
//! );
//! Redirect::to("/")
Expand Down Expand Up @@ -711,6 +712,7 @@ impl<K: 'static> OAuth2<K> {
cookies.add_private(
Cookie::build(STATE_COOKIE_NAME, state)
.same_site(SameSite::Lax)
.secure(true)
.finish(),
);
Ok(Redirect::to(uri))
Expand Down

0 comments on commit c7ece2e

Please sign in to comment.