Add authentication from upstream providers #107
Cargo.lockCargo.toml
assets/img/brands
src
actors
constants.rscontrollers
admin_controller.rslogin_controller.rsmod.rsopenid_controller.rsproviders_controller.rssettings_controller.rstwo_factors_controller.rs
data
action_logger.rsapp_config.rsjwt_signer.rsmod.rsopen_id_user_info.rsopenid_config.rsopenid_primitive.rsprovider.rsprovider_configuration.rstotp_key.rsuser.rsusers_file_entity.rs
main.rstemplates
@ -21,7 +21,7 @@ pub struct TotpKey {
|
|||||||
impl TotpKey {
|
impl TotpKey {
|
||||||
/// Generate a new TOTP key
|
/// Generate a new TOTP key
|
||||||
pub fn new_random() -> Self {
|
pub fn new_random() -> Self {
|
||||||
let random_bytes = rand::thread_rng().gen::<[u8; 10]>();
|
let random_bytes = rand::thread_rng().gen::<[u8; 20]>();
|
||||||
Self {
|
Self {
|
||||||
encoded: base32::encode(BASE32_ALPHABET, &random_bytes),
|
encoded: base32::encode(BASE32_ALPHABET, &random_bytes),
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user