mirror of
https://github.com/ssep1ol/overleaf-registration-be.git
synced 2026-07-21 20:40:21 +00:00
First commit
This commit is contained in:
@@ -4,11 +4,13 @@ import (
|
|||||||
"bytes"
|
"bytes"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"log"
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
)
|
)
|
||||||
|
|
||||||
func validateRecaptcha(token string) (bool, error) {
|
func validateRecaptcha(token string) (bool, error) {
|
||||||
|
log.Printf("Validating Turnstile token: %s", token)
|
||||||
secret := os.Getenv("TURNSTILE_SECRET_KEY")
|
secret := os.Getenv("TURNSTILE_SECRET_KEY")
|
||||||
if secret == "" {
|
if secret == "" {
|
||||||
return false, fmt.Errorf("TURNSTILE_SECRET_KEY is not set")
|
return false, fmt.Errorf("TURNSTILE_SECRET_KEY is not set")
|
||||||
|
|||||||
Reference in New Issue
Block a user