Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

chore(fusionauth): bump passwordless ttl (#5743)

Will Hutchinsonc4833de6528c
diff --git a/crates/macro_cache_client/src/auth.rs b/crates/macro_cache_client/src/auth.rs
index 0b52105f4c..2efdf0127d 100644
--- a/crates/macro_cache_client/src/auth.rs
+++ b/crates/macro_cache_client/src/auth.rs
@@ -4,7 +4,8 @@ pub static MACRO_MOBILE_LOGIN_SESSION_PREFIX: &str = "mbl_login:";
pub static MACRO_MOBILE_LOGIN_SESSION_EXPIRY_SECONDS: u64 = 5 * 60;
/// This is the length of time a passwordless login code is valid for within FusionAuth
-pub static MACRO_PASSWORDLESS_LOGIN_CODE_EXPIRY_SECONDS: u64 = 600;
+/// This matches the time configured in the fusionauth tenant with some buffer time (30s)
+pub static MACRO_PASSWORDLESS_LOGIN_CODE_EXPIRY_SECONDS: u64 = 630;
/// How long after account creation the first completed login is still
/// attributed as a signup (the create-user webhook and the auth callback run
diff --git a/infra/stacks/fusionauth-instance/index.ts b/infra/stacks/fusionauth-instance/index.ts
index 0e33f260f7..50c47db0a7 100644
--- a/infra/stacks/fusionauth-instance/index.ts
+++ b/infra/stacks/fusionauth-instance/index.ts
@@ -180,6 +180,7 @@ const defaultTenant = new FusionAuthTenant(
},
],
externalIdentifierConfiguration: {
+ passwordlessLoginTimeToLiveInSeconds: 600, // 10 minutes for email codes
passwordlessLoginGenerator: {
length: 6,
type: 'randomDigits',