mirror of
https://gh-proxy.org/https://github.com/klinsmaya/new-api.git
synced 2026-11-08 01:17:09 +08:00
Use authorization code flow with PKCE and verified ID tokens for Telegram login, binding, and security verification. Preserve existing bindings and require administrator OAuth configuration. Keep the restricted WeChat first-enrollment session proof, fix missing-target authentication errors, and preserve callback requests after OAuth popups close.
18 lines
454 B
Go
18 lines
454 B
Go
package controller
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
// TelegramLegacyAuth retires the unsigned-flow widget endpoints. Existing
|
|
// Telegram bindings are used by the unified OAuth provider instead.
|
|
func TelegramLegacyAuth(c *gin.Context) {
|
|
c.JSON(http.StatusGone, gin.H{
|
|
"success": false,
|
|
"code": "TELEGRAM_LEGACY_AUTH_REMOVED",
|
|
"message": "Telegram login has changed. Reload the page and start Telegram OAuth again.",
|
|
})
|
|
}
|