feat: fix Apple OAuth issue (#2338)

* feat: fix sign in with apple bug

* fix username
This commit is contained in:
UsherFall
2023-09-18 15:42:00 +08:00
committed by Yang Luo
parent 0fc48bb6cd
commit 7f298efebc
6 changed files with 38 additions and 3 deletions

View File

@ -20,6 +20,7 @@ import (
"encoding/xml"
"fmt"
"io/ioutil"
"net/http"
"net/url"
"strconv"
"strings"
@ -896,3 +897,16 @@ func (c *ApiController) GetCaptchaStatus() {
}
c.ResponseOk(captchaEnabled)
}
// Callback
// @Title Callback
// @Tag Callback API
// @Description Get Login Error Counts
// @router /api/Callback [post]
func (c *ApiController) Callback() {
code := c.GetString("code")
state := c.GetString("state")
frontendCallbackUrl := fmt.Sprintf("/callback?code=%s&state=%s", code, state)
c.Ctx.Redirect(http.StatusFound, frontendCallbackUrl)
}