Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
@@ -45,7 +45,7 @@ async fn main() -> anyhow::Result<()> {
|
||||
conn: Some("postgres://nefarious-test:somenotverysecurepassword@localhost:5432/nefarious-test".into()),
|
||||
},
|
||||
},
|
||||
config: ConfigClap { return_url: "http://localhost:3001".into() } // this normally has /authed
|
||||
config: ConfigClap { return_url: "http://localhost:3001/authed".into() } // this normally has /authed
|
||||
};
|
||||
|
||||
let auth_service = AuthService::new(&auth).await?;
|
||||
@@ -76,9 +76,9 @@ impl FromRef<AppState> for AuthService {
|
||||
}
|
||||
|
||||
async fn login(State(auth_service): State<AuthService>) -> impl IntoResponse {
|
||||
let url = auth_service.login(Some("/authed".into())).await.unwrap();
|
||||
let (headers, url) = auth_service.login(Some("/authed".into())).await.unwrap();
|
||||
|
||||
Redirect::to(url.as_ref())
|
||||
(headers, Redirect::to(url.as_ref()))
|
||||
}
|
||||
|
||||
async fn unauthed() -> String {
|
||||
|
Reference in New Issue
Block a user