@@ -95,7 +95,10 @@ async fn main() {
9595 google_flow,
9696 discord_flow,
9797 session_store,
98- session_config : SessionConfig :: default ( ) ,
98+ session_config : SessionConfig {
99+ secure : false ,
100+ ..Default :: default ( )
101+ } ,
99102 } ;
100103
101104 let mut app = Router :: new ( )
@@ -144,7 +147,7 @@ async fn index(State(state): State<AppState>) -> impl IntoResponse {
144147// --- GitHub Handlers ---
145148async fn github_login ( State ( state) : State < AppState > , cookies : Cookies ) -> Response {
146149 if let Some ( flow) = & state. github_flow {
147- initiate_oauth_login ( flow, & cookies, & [ "user:email" ] ) . into_response ( )
150+ initiate_oauth_login ( flow, & state . session_config , & cookies, & [ "user:email" ] ) . into_response ( )
148151 } else {
149152 (
150153 axum:: http:: StatusCode :: NOT_IMPLEMENTED ,
@@ -182,7 +185,8 @@ async fn github_callback(
182185// --- Google Handlers ---
183186async fn google_login ( State ( state) : State < AppState > , cookies : Cookies ) -> Response {
184187 if let Some ( flow) = & state. google_flow {
185- initiate_oauth_login ( flow, & cookies, & [ "openid" , "email" , "profile" ] ) . into_response ( )
188+ initiate_oauth_login ( flow, & state. session_config , & cookies, & [ "openid" , "email" , "profile" ] )
189+ . into_response ( )
186190 } else {
187191 (
188192 axum:: http:: StatusCode :: NOT_IMPLEMENTED ,
@@ -220,7 +224,8 @@ async fn google_callback(
220224// --- Discord Handlers ---
221225async fn discord_login ( State ( state) : State < AppState > , cookies : Cookies ) -> Response {
222226 if let Some ( flow) = & state. discord_flow {
223- initiate_oauth_login ( flow, & cookies, & [ "identify" , "email" ] ) . into_response ( )
227+ initiate_oauth_login ( flow, & state. session_config , & cookies, & [ "identify" , "email" ] )
228+ . into_response ( )
224229 } else {
225230 (
226231 axum:: http:: StatusCode :: NOT_IMPLEMENTED ,
0 commit comments