Skip to content
This repository has been archived by the owner on Jan 21, 2024. It is now read-only.

perf: improve error message of login #851

Merged
merged 1 commit into from
Feb 17, 2023

Conversation

ruibaby
Copy link
Member

@ruibaby ruibaby commented Feb 12, 2023

What type of PR is this?

/kind improvement

What this PR does / why we need it:

改进登录异常的提示信息,目前大致分为三种:

  1. 用户名或密码错误
  2. 跨域或网络请求异常
  3. CSRF Token 失效

Which issue(s) this PR fixes:

Fixes halo-dev/halo#3291

Screenshots:

image

image

Special notes for your reviewer:

测试方式:

  1. 进入浏览器控制台清理 Cookie,以测试 CSRF Token 失效的情况。
  2. 使用 3000 端口访问 Console,以测试跨域的情况。
  3. 观察以上两种情况的登录请求异常提示信息是否符合要求。

Does this PR introduce a user-facing change?

优化 Console 端登录请求异常的提示

@f2c-ci-robot f2c-ci-robot bot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Feb 12, 2023
@vercel
Copy link

vercel bot commented Feb 12, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
ui ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Feb 12, 2023 at 3:12PM (UTC)

@f2c-ci-robot f2c-ci-robot bot added the kind/improvement Categorizes issue or PR as related to a improvement. label Feb 12, 2023
Copy link
Member

@guqing guqing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@f2c-ci-robot f2c-ci-robot bot added the lgtm Indicates that a PR is ready to be merged. label Feb 15, 2023
@ruibaby
Copy link
Member Author

ruibaby commented Feb 17, 2023

@halo-dev/sig-halo-console

Copy link
Member

@JohnNiang JohnNiang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It works very well.

/approve

@f2c-ci-robot
Copy link

f2c-ci-robot bot commented Feb 17, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JohnNiang

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@f2c-ci-robot f2c-ci-robot bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 17, 2023
@guqing
Copy link
Member

guqing commented Feb 17, 2023

/lgtm

@f2c-ci-robot f2c-ci-robot bot merged commit 1ded5be into halo-dev:main Feb 17, 2023
@ruibaby ruibaby deleted the perf/improve-login-message branch February 17, 2023 06:32
@ruibaby ruibaby modified the milestones: 2.3.x, 2.3.0 Feb 20, 2023
JohnNiang pushed a commit to JohnNiang/halo that referenced this pull request Mar 2, 2023
#### What type of PR is this?

/kind improvement

#### What this PR does / why we need it:

改进登录异常的提示信息,目前大致分为三种:

1. 用户名或密码错误
2. 跨域或网络请求异常
3. CSRF Token 失效

#### Which issue(s) this PR fixes:

Fixes halo-dev#3291

#### Screenshots:

<img width="1402" alt="image" src="https://user-images.githubusercontent.com/21301288/218319203-19517ab7-7740-41f9-8579-f10a60aa6e51.png">
<img width="1673" alt="image" src="https://user-images.githubusercontent.com/21301288/218319221-2fc332f4-4de7-4417-a277-0c4a396d6389.png">


#### Special notes for your reviewer:

测试方式:

1. 进入浏览器控制台清理 Cookie,以测试 CSRF Token 失效的情况。
2. 使用 3000 端口访问 Console,以测试跨域的情况。
3. 观察以上两种情况的登录请求异常提示信息是否符合要求。

#### Does this PR introduce a user-facing change?

```release-note
优化 Console 端登录请求异常的提示
```
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/improvement Categorizes issue or PR as related to a improvement. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Console 端登录异常提示需要优化
3 participants