File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -148,7 +148,7 @@ public function verify ( $pin ) {
148148
149149 /**
150150 * This function simply takes in information as parameters and generates a request to
151- * Google 's chart's API to generate a QR code. These QR codes are used for account setup
151+ * quickchart.io 's chart's API to generate a QR code. These QR codes are used for account setup
152152 * for TOTP authentication.
153153 * @param string email The email to assign account to
154154 * @param string issuer The issuer of the account
@@ -159,12 +159,12 @@ public function verify ( $pin ) {
159159 public function QRCode ( $ email , $ issuer , $ secret , $ size = 200 ) {
160160 // Create the standard TOTP URI using the secret, issuer, and user/host
161161 $ uri = "otpauth://totp/ $ email?secret= " . $ secret . "&issuer= " . $ issuer ;
162- // Create the Google QR code GET request
163- $ url = "https://chart.googleapis.com/chart " ;
164- $ url .= "?cht= qr " ;
165- $ url .= "&chs = " . $ size ;
166- $ url .= "&chl = " . urlencode ( $ uri ) ;
167- $ url .= "&chld=H|0 " ;
162+ // Create the quickchart.io QR code GET request
163+ $ url = "https://quickchart.io/ " ;
164+ $ url .= "qr " ;
165+ $ url .= "?text = " . urlencode ( $ uri ) ;
166+ $ url .= "&width = " . $ size . " &height= " . $ size ;
167+ $ url .= "&margin=1 " ;
168168 // Return the URL to the QR barcode
169169 return $ url ;
170170 }
You can’t perform that action at this time.
0 commit comments