Update rauth, pin git repositories in Cargo.toml.

This commit is contained in:
Paul Makles
2021-01-25 21:35:47 +00:00
parent 99e2f874a1
commit 75a35831da
5 changed files with 266 additions and 186 deletions

View File

@@ -20,7 +20,7 @@ pub mod util;
use futures::join;
use log::info;
use rauth;
use rauth::{self, options::Options};
use rocket_cors::AllowedOrigins;
#[async_std::main]
@@ -55,10 +55,12 @@ async fn launch_web() {
.to_cors()
.expect("Failed to create CORS.");
let auth = rauth::auth::Auth::new(database::get_collection("accounts"));
let auth = rauth::auth::Auth::new(database::get_collection("accounts"), Options::new());
routes::mount(rauth::routes::mount(rocket::ignite(), "/auth", auth))
routes::mount(rocket::ignite())
.mount("/", rocket_cors::catch_all_options_routes())
.mount("/auth", rauth::routes::routes())
.manage(auth)
.manage(cors.clone())
.attach(cors)
.launch()