mirror of
				https://github.com/Ylianst/MeshCentral.git
				synced 2025-03-09 15:40:18 +00:00 
			
		
		
		
	add subfolder to 2fa domain name #5238
Signed-off-by: si458 <simonsmith5521@gmail.com>
This commit is contained in:
		
							parent
							
								
									9986567cf0
								
							
						
					
					
						commit
						6cacec010b
					
				
					 1 changed files with 5 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -3544,7 +3544,11 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
 | 
			
		|||
                        const secret = otplib.authenticator.generateSecret(); // TODO: Check the random source of this value.
 | 
			
		||||
 | 
			
		||||
                        var domainName = parent.certificates.CommonName;
 | 
			
		||||
                        if (domain.dns != null) { domainName = domain.dns; }
 | 
			
		||||
                        if (domain.dns != null) { 
 | 
			
		||||
                            domainName = domain.dns;
 | 
			
		||||
                        } else if (domain.dns == null && domain.id != '') {
 | 
			
		||||
                            domainName += "/" + domain.id;
 | 
			
		||||
                        }
 | 
			
		||||
                        ws.send(JSON.stringify({ action: 'otpauth-request', secret: secret, url: otplib.authenticator.keyuri(encodeURIComponent(user.name), domainName, secret) }));
 | 
			
		||||
                    }
 | 
			
		||||
                    break;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue