Skip to content

Commit

Permalink
examples: updated axum session to latest 0.9 in examples (#2049)
Browse files Browse the repository at this point in the history
* updated axum_database_sessions to axum_session along with axum_sessions_auth to axum_session_auth

* updated to axum session 0.9
  • Loading branch information
Andrew Wheeler(Genusis) authored Nov 21, 2023
1 parent cb6267a commit 453911e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
6 changes: 3 additions & 3 deletions examples/session_auth_axum/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@ tower = { version = "0.4.13", optional = true }
tower-http = { version = "0.4", features = ["fs"], optional = true }
tokio = { version = "1.22.0", features = ["full"], optional = true }
http = { version = "0.2.8" }
sqlx = { version = "0.6.2", features = [
sqlx = { version = "0.7.2", features = [
"runtime-tokio-rustls",
"sqlite",
], optional = true }
thiserror = "1.0.38"
wasm-bindgen = "0.2"
axum_session_auth = { version = "0.2.1", features = [
axum_session_auth = { version = "0.9.0", features = [
"sqlite-rustls",
], optional = true }
axum_session = { version = "0.2.3", features = [
axum_session = { version = "0.9.0", features = [
"sqlite-rustls",
], optional = true }
bcrypt = { version = "0.14", optional = true }
Expand Down
Binary file modified examples/session_auth_axum/Todos.db
Binary file not shown.
3 changes: 1 addition & 2 deletions examples/session_auth_axum/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@ if #[cfg(feature = "ssr")] {
// Auth section
let session_config = SessionConfig::default().with_table_name("axum_sessions");
let auth_config = AuthConfig::<i64>::default();
let session_store = SessionStore::<SessionSqlitePool>::new(Some(pool.clone().into()), session_config);
session_store.initiate().await.unwrap();
let session_store = SessionStore::<SessionSqlitePool>::new(Some(pool.clone().into()), session_config).await.unwrap();

sqlx::migrate!()
.run(&pool)
Expand Down

0 comments on commit 453911e

Please sign in to comment.