fix(auth): redirect to home after successful OAuth login
Some checks failed
Deploy to production / deploy (push) Has been cancelled
Some checks failed
Deploy to production / deploy (push) Has been cancelled
This commit is contained in:
@@ -45,7 +45,7 @@ export default {
|
|||||||
}
|
}
|
||||||
const response = await apiClient.post('/api/auth/oauth/exchange', payload);
|
const response = await apiClient.post('/api/auth/oauth/exchange', payload);
|
||||||
await this.login({ user: response.data, rememberMe: true });
|
await this.login({ user: response.data, rememberMe: true });
|
||||||
await this.$router.replace('/settings/personal');
|
await this.$router.replace('/');
|
||||||
} catch (loginError) {
|
} catch (loginError) {
|
||||||
this.hasError = true;
|
this.hasError = true;
|
||||||
this.errorMessage = loginError?.response?.data?.error || this.$t('home.nologin.oauth.callbackFailure');
|
this.errorMessage = loginError?.response?.data?.error || this.$t('home.nologin.oauth.callbackFailure');
|
||||||
@@ -84,4 +84,4 @@ export default {
|
|||||||
.oauth-callback-error {
|
.oauth-callback-error {
|
||||||
color: #a94442;
|
color: #a94442;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user