logo: full color with a white overlay
This commit is contained in:
parent
a47e4c204a
commit
19840b31e6
2 changed files with 11 additions and 17 deletions
|
|
@ -1,19 +1,19 @@
|
|||
use crate::routes::prelude::*;
|
||||
use crate::tokens::{generate_jwt, generate_refresh_token};
|
||||
use crate::tokens::{
|
||||
JWT_COOKIE_NAME, JWT_DURATION_MINUTES, REFRESH_TOKEN_COOKIE_NAME, REFRESH_TOKEN_DURATION_DAYS,
|
||||
};
|
||||
use apps::App;
|
||||
use authorization_codes::AuthorizationCode;
|
||||
use jwt::database::Key;
|
||||
use jwt::PrivateKey;
|
||||
use refresh_tokens::RefreshToken;
|
||||
use rocket::get;
|
||||
use rocket::http::{Cookie, CookieJar, SameSite};
|
||||
use rocket::time::Duration;
|
||||
use settings::Settings;
|
||||
use std::net::IpAddr;
|
||||
use users::User;
|
||||
use crate::tokens::{
|
||||
JWT_COOKIE_NAME, JWT_DURATION_MINUTES, REFRESH_TOKEN_COOKIE_NAME, REFRESH_TOKEN_DURATION_DAYS,
|
||||
};
|
||||
use rocket::http::{Cookie, CookieJar, SameSite};
|
||||
use rocket::time::Duration;
|
||||
|
||||
#[get("/oauth/redirect?<redirect_request..>")]
|
||||
pub async fn redirect_page(
|
||||
|
|
@ -74,18 +74,12 @@ pub async fn redirect_page(
|
|||
.ok_or_else(|| Error::bad_request("Server url is not set"))?;
|
||||
|
||||
if jwt_user.is_none() {
|
||||
// TODO: refactor for "code" route
|
||||
|
||||
// Generate refresh token
|
||||
let refresh_token = generate_refresh_token(
|
||||
&mut transaction,
|
||||
ip_address,
|
||||
user.id(),
|
||||
app.id(),
|
||||
)
|
||||
.await
|
||||
.map_err(Error::internal_server_error)?;
|
||||
|
||||
let refresh_token =
|
||||
generate_refresh_token(&mut transaction, ip_address, user.id(), app.id())
|
||||
.await
|
||||
.map_err(Error::internal_server_error)?;
|
||||
|
||||
// Add refresh token as a cookie
|
||||
let mut cookie = Cookie::new(REFRESH_TOKEN_COOKIE_NAME, refresh_token);
|
||||
cookie.set_secure(true);
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
<a href="/" class="navbar-brand navbar-brand-autodark">
|
||||
<a href="/" class="navbar-brand bg-white-overlay rounded-3">
|
||||
<img src="/logo" alt="business logo" style="max-width: 13rem; padding: 1rem;">
|
||||
</a>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue