added token storage in a store, and improved layout on mobile
This commit is contained in:
@@ -37,7 +37,7 @@ pub fn verify_password(hash: &str, password: &str) -> bool {
|
|||||||
|
|
||||||
pub fn create_jwt(user_uuid: Uuid) -> Result<String, String> {
|
pub fn create_jwt(user_uuid: Uuid) -> Result<String, String> {
|
||||||
let expiration = Utc::now()
|
let expiration = Utc::now()
|
||||||
.checked_add_signed(Duration::minutes(15))
|
.checked_add_signed(Duration::days(100))
|
||||||
.expect("valid timestamp")
|
.expect("valid timestamp")
|
||||||
.timestamp();
|
.timestamp();
|
||||||
|
|
||||||
|
|||||||
@@ -24,8 +24,8 @@ async fn main() -> anyhow::Result<()> {
|
|||||||
.allow_headers([header::AUTHORIZATION, header::CONTENT_TYPE]);
|
.allow_headers([header::AUTHORIZATION, header::CONTENT_TYPE]);
|
||||||
|
|
||||||
let governor_conf = GovernorConfigBuilder::default()
|
let governor_conf = GovernorConfigBuilder::default()
|
||||||
.per_second(10)
|
.per_second(25)
|
||||||
.burst_size(20)
|
.burst_size(50)
|
||||||
.finish()
|
.finish()
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user