mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-06-18 19:54:26 +00:00
feat: request google login while refresh
This commit is contained in:
@@ -8,8 +8,9 @@ import './assets/toast.css'
|
||||
// Use Sugar theme from vue-toast-notification for better toast styling.
|
||||
// If you prefer Bootstrap style, replace with theme-bootstrap.css instead.
|
||||
import { useToast } from 'vue-toastification'
|
||||
import { checkToken, clearToken } from './utils/auth'
|
||||
import { checkToken, clearToken, isLogin } from './utils/auth'
|
||||
import { initTheme } from './utils/theme'
|
||||
import { loginWithGoogle } from './utils/google'
|
||||
|
||||
// Configurable API domain and port
|
||||
// export const API_DOMAIN = 'http://127.0.0.1'
|
||||
@@ -47,4 +48,10 @@ checkToken().then(valid => {
|
||||
if (!valid) {
|
||||
clearToken()
|
||||
}
|
||||
|
||||
if (!isLogin()) {
|
||||
setTimeout(() => {
|
||||
loginWithGoogle()
|
||||
}, 3000)
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user