Skip to content

Commit 9546208

Browse files
committed
Refactor OIDC redirect URL cookie name construction for improved clarity
1 parent 6d6f503 commit 9546208

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/webserver/oidc.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -807,8 +807,7 @@ fn get_redirect_url_cookie(
807807
request: &ServiceRequest,
808808
csrf_token: &CsrfToken,
809809
) -> anyhow::Result<Cookie<'static>> {
810-
let state = csrf_token.secret();
811-
let cookie_name = format!("{SQLPAGE_REDIRECT_URL_COOKIE_PREFIX}{state}");
810+
let cookie_name = SQLPAGE_REDIRECT_URL_COOKIE_PREFIX.to_owned() + csrf_token.secret();
812811
request
813812
.cookie(&cookie_name)
814813
.with_context(|| format!("No {cookie_name} cookie found"))

0 commit comments

Comments
 (0)