update oauth2 (#84)

* update oauth2

* i18n

* fix validation

* chore: auto-fix linting and formatting issues

---------

Co-authored-by: uubulb <uubulb@users.noreply.github.com>
This commit is contained in:
UUBulb
2024-12-31 23:11:41 +08:00
committed by GitHub
co-authored by uubulb
parent aa00431f8b
commit 5d8a0404b7
8 changed files with 418 additions and 435 deletions
+3 -5
View File
@@ -35,11 +35,9 @@ function Login() {
const { data: settingData } = useSetting()
useEffect(() => {
const oauth2Code = new URLSearchParams(window.location.search).get("code")
const oauth2State = new URLSearchParams(window.location.search).get("state")
const oauth2Provider = new URLSearchParams(window.location.search).get("provider")
if (oauth2Code && oauth2State && oauth2Provider) {
loginOauth2(oauth2Provider, oauth2State, oauth2Code)
const oauth2 = new URLSearchParams(window.location.search).get("oauth2")
if (oauth2) {
loginOauth2()
}
}, [window.location.search])