mirror of
				https://github.com/superseriousbusiness/gotosocial.git
				synced 2025-11-03 18:32:25 -06:00 
			
		
		
		
	don't bother with string conversion for consts
This commit is contained in:
		
					parent
					
						
							
								9d10fb59b5
							
						
					
				
			
			
				commit
				
					
						d84d73c050
					
				
			
		
					 1 changed files with 2 additions and 3 deletions
				
			
		| 
						 | 
					@ -27,7 +27,6 @@ import (
 | 
				
			||||||
	"io"
 | 
						"io"
 | 
				
			||||||
	"net/url"
 | 
						"net/url"
 | 
				
			||||||
	"sort"
 | 
						"sort"
 | 
				
			||||||
	"strconv"
 | 
					 | 
				
			||||||
	"strings"
 | 
						"strings"
 | 
				
			||||||
	"time"
 | 
						"time"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -86,9 +85,9 @@ func totpURLForUser(user *gtsmodel.User) *url.URL {
 | 
				
			||||||
	v := url.Values{}
 | 
						v := url.Values{}
 | 
				
			||||||
	v.Set("secret", user.TwoFactorSecret)
 | 
						v.Set("secret", user.TwoFactorSecret)
 | 
				
			||||||
	v.Set("issuer", issuer)
 | 
						v.Set("issuer", issuer)
 | 
				
			||||||
	v.Set("period", strconv.FormatInt(30, 10))
 | 
						v.Set("period", "30") // 30 seconds totp validity.
 | 
				
			||||||
	v.Set("algorithm", "SHA1")
 | 
						v.Set("algorithm", "SHA1")
 | 
				
			||||||
	v.Set("digits", strconv.FormatInt(6, 10))
 | 
						v.Set("digits", "6") // 6-digit totp.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return &url.URL{
 | 
						return &url.URL{
 | 
				
			||||||
		Scheme:   "otpauth",
 | 
							Scheme:   "otpauth",
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue