feat: login logic

This commit is contained in:
Tim
2025-07-16 12:38:03 +08:00
parent ea90a6a7b8
commit ea85af4a52
11 changed files with 150 additions and 138 deletions

View File

@@ -12,8 +12,9 @@ export default {
const code = url.searchParams.get('code')
const state = url.searchParams.get('state')
const result = await githubExchange(code, state, '')
if (result === 'NEED_REASON') {
this.$router.push('/signup-reason?github=1')
if (result.needReason) {
this.$router.push('/signup-reason?token=' + result.token)
} else {
this.$router.push('/')
}