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 24f9f98 commit 44d596d
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 @@ -92,6 +92,7 @@
//! cookies.add_private(
//! Cookie::build(("token", token.access_token().to_string()))
//! .same_site(SameSite::Lax)
//! .secure(true)
//! .build()
//! );
//! Redirect::to("/")
Expand Down Expand Up @@ -699,6 +700,7 @@ impl<K: 'static> OAuth2<K> {
cookies.add_private(
Cookie::build((STATE_COOKIE_NAME, state))
.same_site(SameSite::Lax)
.secure(true)
.build(),
);
Ok(Redirect::to(uri))
Expand Down

0 comments on commit 44d596d

Please sign in to comment.