# 支持三方登录认证与多语言，Halo 2.4.0 发布

原文：<https://www.halo.run/archives/halo-240-released>

2023 年 3 月 31 日，强大易用的开源建站工具 Halo 正式发布 2.4.0 版本。

在这一版本中，Halo 主要支持了扩展第三方登录方式以及管理端的多语言功能，并带来 30 多项的功能更新和问题修复，非常感谢大家的反馈和支持。此外，我们在三方认证的扩展基础上提供了一个开源的 OAuth2 插件，目前支持接入 GitHub、GitLab、Gitee 平台的三方认证登录，欢迎大家体验。

## **主要亮点更新**

### **支持扩展登录方式**

在 Halo 2.4.0 中，我们提供了扩展第三方登录的能力，开发者可以基于此扩展点来接入第三方登录协议。我们也在此基础上提供了一个接入 OAuth2 认证方式的插件，目前支持 GitHub、GitLab、Gitee 平台，插件地址：[**https://github.com/halo-sigs/plugin-oauth2**](https://github.com/halo-sigs/plugin-oauth2)

认证方式管理：

![](https://www.halo.run/upload/identity-authentication.png)

绑定 & 解绑：

![](https://www.halo.run/upload/profile.png)

登录：

![](https://www.halo.run/upload/login.png)

### **支持用户注册**

随着三方登录方式的支持，我们同时支持了用户注册，用户可以使用三方登录方式登录后绑定账号或者注册新的账号。

![](https://www.halo.run/upload/signup.png)

### **管理端支持多语言**

从 Halo 2.4.0 开始，Halo 将逐步支持国际化，目前我们已经为管理端添加了简体中文和英文的语言包。同时我们非常期欢迎大家帮助完善其他语言包。

![](https://www.halo.run/upload/dashboard-i18n.png)

## **完整变更日志**

### **新特性**

-   支持通过插件扩展三方的认证方式。 by [**@guqing**](https://github.com/guqing) in [#3520](https://github.com/halo-dev/halo/pull/3520)
    
-   支持用户注册功能。 by [**@guqing**](https://github.com/guqing) in [#3631](https://github.com/halo-dev/halo/pull/3631)
    
-   Console 端支持多语言界面。 by [**@ruibaby**](https://github.com/ruibaby) in [#3506](https://github.com/halo-dev/halo/pull/3506)
    
-   Console 端仪表盘的快捷访问中添加刷新搜索引擎索引的入口。 by [**@ruibaby**](https://github.com/ruibaby) in [#3475](https://github.com/halo-dev/halo/pull/3475)
    
-   支持登录时密码加密传输。 by [**@JohnNiang**](https://github.com/JohnNiang) in [#3480](https://github.com/halo-dev/halo/pull/3480)
    
-   提供 Secret 自定义模型用于存储敏感数据。 by [**@guqing**](https://github.com/guqing) in [#3594](https://github.com/halo-dev/halo/pull/3594)
    

### **功能优化**

-   优化搜索引擎查询结果。 by [**@JohnNiang**](https://github.com/JohnNiang) in [#3457](https://github.com/halo-dev/halo/pull/3457)
    
-   支持强制保存文章和页面的设置，避免因为 Version 锁的机制导致保存失败。 by [**@ruibaby**](https://github.com/ruibaby) in [#3498](https://github.com/halo-dev/halo/pull/3498)
    
-   对访问量统计的 API 增加数据合法性校验。 by [**@guqing**](https://github.com/guqing) in [#3546](https://github.com/halo-dev/halo/pull/3546)
    
-   禁用非登录场景下，密码输入框的浏览器自动填充。 by [**@ruibaby**](https://github.com/ruibaby) in [#3550](https://github.com/halo-dev/halo/pull/3550)
    
-   重构项目结构以支持发布插件所需的依赖。 by [**@JohnNiang**](https://github.com/JohnNiang) in [#3552](https://github.com/halo-dev/halo/pull/3552)
    
-   优化 Console 端评论管理列表项的布局。 by [**@ruibaby**](https://github.com/ruibaby) in [#3563](https://github.com/halo-dev/halo/pull/3563)
    
-   支持聚合多个角色到一个角色。 by [**@guqing**](https://github.com/guqing) in [#3568](https://github.com/halo-dev/halo/pull/3568)
    
-   Console 端添加 Dropdown 组件以统一所有下拉框的样式和表现。 by [**@ruibaby**](https://github.com/ruibaby) in [#3576](https://github.com/halo-dev/halo/pull/3576)
    
-   优化 Console 在移动端下底部菜单栏的布局和样式。 by [**@ruibaby**](https://github.com/ruibaby) in [#3577](https://github.com/halo-dev/halo/pull/3577)
    
-   Console 端的文章管理支持点击列表的可见性图标切换可见性状态。 by @123abcabcabcabcba in [#3581](https://github.com/halo-dev/halo/pull/3581)
    
-   优化 Console 端页面滚动条的样式。 by [**@ruibaby**](https://github.com/ruibaby) in [#3587](https://github.com/halo-dev/halo/pull/3587)
    
-   优化 Console 端左侧菜单栏边框阴影的样式。 by [**@ruibaby**](https://github.com/ruibaby) in [#3638](https://github.com/halo-dev/halo/pull/3638)
    

### **问题修复**

-   修复文章创建和发布经常失败的问题。 by [**@JohnNiang**](https://github.com/JohnNiang) in [#3441](https://github.com/halo-dev/halo/pull/3441)
    
-   修复使用邮箱评论时的排序问题。 by [**@guqing**](https://github.com/guqing) in [#3458](https://github.com/halo-dev/halo/pull/3458)
    
-   修复 Console 端在使用三方编辑器插件编辑文章时可能出现无法加载内容的问题。 by [**@wzrove**](https://github.com/wzrove) in [#3468](https://github.com/halo-dev/halo/pull/3468)
    
-   修复文章和自定义页面缺失属性导致的访问量无法计数问题。 by [**@guqing**](https://github.com/guqing) in [#3471](https://github.com/halo-dev/halo/pull/3471)
    
-   修复非 HTTPS 环境下，在 Chromium 内核浏览器拖拽上传文件时出现浏览器崩溃的问题。 by [**@ruibaby**](https://github.com/ruibaby) in [#3481](https://github.com/halo-dev/halo/pull/3481)
    
-   修复在新建文章时，首次切换编辑器后没有设置内容 rawType 资源为对应编辑器类型的问题。 by [**@intoyang**](https://github.com/intoyang) in [#3516](https://github.com/halo-dev/halo/pull/3516)
    
-   修复文章设置中的标签选择组件无法正常搜索的问题。 by [**@ruibaby**](https://github.com/ruibaby) in [#3540](https://github.com/halo-dev/halo/pull/3540)
    
-   修复新建文章或页面保存后，本地内容缓存可能不会及时清空的问题。 by [**@ruibaby**](https://github.com/ruibaby) in [#3551](https://github.com/halo-dev/halo/pull/3551)
    
-   修复未审核过的回复包含在了评论的回复数量中的问题。 by [**@guqing**](https://github.com/guqing) in [#3578](https://github.com/halo-dev/halo/pull/3578)
    
-   修复插件启动失败后停止插件时出现的 NPE 问题。 by [**@guqing**](https://github.com/guqing) in [#3580](https://github.com/halo-dev/halo/pull/3580)
    
-   修复 Console 端发布文章可能调用多次接口的问题。 by [**@ruibaby**](https://github.com/ruibaby) in [#3619](https://github.com/halo-dev/halo/pull/3619)
    

### **依赖更新**

-   升级至 MariaDB R2DBC connector 1.1.4。 by [**@JohnNiang**](https://github.com/JohnNiang) in [#3610](https://github.com/halo-dev/halo/pull/3610)
    
-   升级至 Spring Boot 3.0.5。 by [**@JohnNiang**](https://github.com/JohnNiang) in [#3609](https://github.com/halo-dev/halo/pull/3609)
    
-   升级 Console 端的 FormKit 的版本到 0.16.2。 by [**@ruibaby**](https://github.com/ruibaby) in [#3527](https://github.com/halo-dev/halo/pull/3527)
