Skip to content

Commit

Permalink
🚧 Forward action to siwe frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
preetjdp committed Jun 28, 2023
1 parent 0a6a7ea commit 518897f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "siwe-oidc"
version = "0.1.0"
version = "1.1.2"
edition = "2021"
authors = ["Spruce Systems, Inc."]
license = "MIT OR Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion js/ui/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "siwe-ui",
"private": true,
"version": "1.1.1",
"version": "1.1.2",
"scripts": {
"dev": "webpack serve --port 9080",
"build": "cross-env NODE_ENV=production webpack && mkdir -p ../../static && mv dist/* ../../static/",
Expand Down
7 changes: 4 additions & 3 deletions src/oidc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -355,14 +355,15 @@ pub async fn token(
#[derive(Deserialize)]
pub struct AuthorizeParams {
pub client_id: String,
pub action: String,
pub redirect_uri: RedirectUrl,
pub scope: Scope,
pub response_type: Option<CoreResponseType>,
pub state: Option<String>,
pub nonce: Option<Nonce>,
pub prompt: Option<CoreAuthPrompt>,
pub request_uri: Option<RequestUrl>,
pub request: Option<String>,
pub request: Option<String>,
}

pub async fn authorize(
Expand Down Expand Up @@ -487,8 +488,8 @@ pub async fn authorize(
};
Ok((
format!(
"/?nonce={}&domain={}&redirect_uri={}&state={}&client_id={}{}",
nonce, domain, *params.redirect_uri, state, params.client_id, oidc_nonce_param
"/?nonce={}&domain={}&redirect_uri={}&state={}&action={}&client_id={}{}",
nonce, domain, *params.redirect_uri, state, params.action, params.client_id, oidc_nonce_param
),
Box::new(session_cookie),
))
Expand Down

0 comments on commit 518897f

Please sign in to comment.