mirror of
https://github.com/kevin-DL/m3o-go.git
synced 2026-01-12 10:55:11 +00:00
19 lines
298 B
Go
Executable File
19 lines
298 B
Go
Executable File
package example
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
|
|
"go.m3o.com/otp"
|
|
)
|
|
|
|
// Validate the OTP code
|
|
func ValidateOtp() {
|
|
otpService := otp.NewOtpService(os.Getenv("M3O_API_TOKEN"))
|
|
rsp, err := otpService.Validate(&otp.ValidateRequest{
|
|
Code: "656211",
|
|
Id: "asim@example.com",
|
|
})
|
|
fmt.Println(rsp, err)
|
|
}
|