Skip to content

Commit

Permalink
rm sass, use new api
Browse files Browse the repository at this point in the history
  • Loading branch information
aumetra committed Nov 29, 2024
1 parent b210f72 commit 942f8df
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 28 deletions.
3 changes: 1 addition & 2 deletions kitsune-fe/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
"prettier-plugin-css-order": "^2.1.2",
"prettier-plugin-svelte": "^3.3.2",
"prettier-plugin-tailwindcss": "^0.6.9",
"sass": "^1.81.0",
"svelte": "^5.2.9",
"svelte-check": "^4.1.0",
"tailwindcss": "^3.4.15",
Expand All @@ -46,4 +45,4 @@
"vitest": "^2.1.6",
"zod": "^3.23.8"
}
}
}
19 changes: 9 additions & 10 deletions kitsune/src/oauth2/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,16 +136,15 @@ impl OAuth2Service {
})?;

if application.redirect_uri == SHOW_TOKEN_URI {
let page = crate::template::templates()
.render(
"oauth/token.html",
&ShowTokenPage {
app_name: application.name,
domain: self.url_service.domain().into(),
token: authorization_code.code,
},
)
.unwrap();
let page = crate::template::render(
"oauth/token.html",
&ShowTokenPage {
app_name: application.name,
domain: self.url_service.domain().into(),
token: authorization_code.code,
},
)
.unwrap();

Ok(Html(page).into_response())
} else {
Expand Down
23 changes: 11 additions & 12 deletions kitsune/src/oauth2/solicitor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,18 +107,17 @@ impl OAuthOwnerSolicitor {
let user_id = self.authenticated_user.id.to_string();
let csrf_token = self.csrf_handle.sign(user_id); // TODO: BAD DO NOT USE USER-ID

let body = crate::template::templates()
.render(
"oauth/consent.html",
&ConsentPage {
authenticated_username: &self.authenticated_user.username,
app_name: &app_name,
csrf_token: csrf_token.as_str(),
query,
scopes: &scopes,
},
)
.map_err(|err| WebError::InternalError(Some(err.to_string())))?;
let body = crate::template::render(
"oauth/consent.html",
&ConsentPage {
authenticated_username: &self.authenticated_user.username,
app_name: &app_name,
csrf_token: csrf_token.as_str(),
query,
scopes: &scopes,
},
)
.unwrap();

OwnerConsent::InProgress(
OAuthResponse::default()
Expand Down
7 changes: 3 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 942f8df

Please sign in to comment.