diff --git a/.DS_Store b/.DS_Store index 0eb2e23..fbedd3a 100755 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/main.go b/main.go index 943fc29..dd37d26 100755 --- a/main.go +++ b/main.go @@ -592,6 +592,13 @@ func main() { if err != nil { return c.JSON(http.StatusNotFound, map[string]string{"error": "User not found"}) } + + //check the user type + isOAuthLogin := user.GetString("is_oauth_login") + if isOAuthLogin != "0" { + return c.JSON(http.StatusOK, map[string]string{"message": "Password reset is not available for accounts signed in with Apple or Google."}) + } + name := user.GetString("name") // Generate token token := generateToken() @@ -608,7 +615,8 @@ func main() { // Send email subject := "Reset your FCSC password" // resetURL := fmt.Sprintf("%s/api/auth/reset-password?token=%s", baseUrl, token) - resetURL := fmt.Sprintf("https://www.fcsc.com/forgot-password/%s", email) + //https://fcscapp.onelink.me/forgot-password/surendar.m@venbainfotech.com + resetURL := fmt.Sprintf("https://fcscapp.onelink.me/forgot-password/%s", email) body := fmt.Sprintf(` diff --git a/pb_data/data.db b/pb_data/data.db index bacf5f1..a76ce7e 100755 Binary files a/pb_data/data.db and b/pb_data/data.db differ diff --git a/pb_data/logs.db b/pb_data/logs.db old mode 100755 new mode 100644 index 792b1a7..21dcf3e Binary files a/pb_data/logs.db and b/pb_data/logs.db differ