feat: return refresh_token in cookie
This commit is contained in:
parent
ebb4286c08
commit
0f897dc0c6
5 changed files with 32 additions and 33 deletions
|
@ -7,6 +7,7 @@ use std::{
|
|||
use actix_web::{HttpResponse, Scope, web};
|
||||
use log::error;
|
||||
use regex::Regex;
|
||||
use serde::Serialize;
|
||||
use sqlx::Postgres;
|
||||
use uuid::Uuid;
|
||||
|
||||
|
@ -15,6 +16,11 @@ mod refresh;
|
|||
mod register;
|
||||
mod revoke;
|
||||
|
||||
#[derive(Serialize)]
|
||||
struct Response {
|
||||
access_token: String,
|
||||
}
|
||||
|
||||
static EMAIL_REGEX: LazyLock<Regex> = LazyLock::new(|| {
|
||||
Regex::new(r"[-A-Za-z0-9!#$%&'*+/=?^_`{|}~]+(?:\.[-A-Za-z0-9!#$%&'*+/=?^_`{|}~]+)*@(?:[A-Za-z0-9](?:[-A-Za-z0-9]*[A-Za-z0-9])?\.)+[A-Za-z0-9](?:[-A-Za-z0-9]*[A-Za-z0-9])?").unwrap()
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue