Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions rs/pocket_ic_server/src/external_canister_types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,13 @@ pub struct CaptchaConfig {
pub captcha_trigger: CaptchaTrigger,
}

#[derive(CandidType)]
pub enum OpenIdEmailVerification {
Unknown,
Google,
Microsoft,
}

#[derive(CandidType)]
pub struct OpenIdConfig {
pub name: String,
Expand All @@ -99,6 +106,7 @@ pub struct OpenIdConfig {
pub auth_uri: String,
pub auth_scope: Vec<String>,
pub fedcm_uri: Option<String>,
pub email_verification: Option<OpenIdEmailVerification>,
}

#[allow(dead_code)]
Expand Down Expand Up @@ -132,6 +140,8 @@ pub struct InternetIdentityInit {
pub enable_dapps_explorer: Option<bool>,
pub is_production: Option<bool>,
pub dummy_auth: Option<Option<DummyAuthConfig>>,
pub backend_canister_id: Option<Principal>,
pub backend_origin: Option<String>,
}

/* Bitcoin canister */
Expand Down
5 changes: 4 additions & 1 deletion rs/pocket_ic_server/src/pocket_ic.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::external_canister_types::{
BitcoinCanisterArg, CaptchaConfig, CaptchaTrigger, CyclesLedgerArgs, CyclesLedgerConfig,
DogecoinCanisterArg, InternetIdentityInit, NnsDappCanisterArguments, OpenIdConfig,
RateLimitConfig, SnsAggregatorConfig, StaticCaptchaTrigger,
OpenIdEmailVerification, RateLimitConfig, SnsAggregatorConfig, StaticCaptchaTrigger,
};
use crate::state_api::routes::into_api_response;
use crate::state_api::state::{HasStateLabel, OpOut, PocketIcError, StateLabel};
Expand Down Expand Up @@ -2105,6 +2105,7 @@ impl PocketIcSubnets {
auth_uri: "https://accounts.google.com/o/oauth2/v2/auth".to_string(),
auth_scope: vec!["openid".to_string(), "profile".to_string(), "email".to_string()],
fedcm_uri: Some("".to_string()),
email_verification: Some(OpenIdEmailVerification::Google),
}])
} else {
None
Expand All @@ -2129,6 +2130,8 @@ impl PocketIcSubnets {
enable_dapps_explorer: Some(false),
is_production: Some(false), // DIFFERENT FROM ICP MAINNET
dummy_auth: Some(None),
backend_canister_id: None,
backend_origin: None,
});
ii_subnet
.state_machine
Expand Down
Loading