Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add client login support #109

Merged
merged 5 commits into from
Jan 2, 2021
Merged

feat: add client login support #109

merged 5 commits into from
Jan 2, 2021

Conversation

lizheming
Copy link
Collaborator

@lizheming lizheming commented Jan 2, 2021

  1. Add login buttion in @vercel/client, it will open a new window to load login url when you click.
  2. The login page is same with admin dashboard. The login window will be closed after login success, also user info will passed to original page.
  3. The original page will show user info in the page after received user info. All info input box will be hidden at the same time.
  4. Then you can post your comment just input your comment text.
  5. We can get user id by the login token at the backed, and we will add a new filed user_id to storage it.

  1. 客户端增加登录按钮,点击登录按钮后会开启登录的新窗口。
  2. 登录窗口复用了后台的登录,登录完成后会关闭当前窗口,并将用户信息传递给原页面。
  3. 原页面获取到用户信息后展示,同时隐藏需要输入用户信息的输入框。
  4. 此时输入评论内容即可直接发送了
  5. 后台会通过登录密钥获取到用户 ID,并在数据中新增了 user_id 的关联字段。

image

image

@lizheming lizheming merged commit 9c060a9 into master Jan 2, 2021
@lizheming lizheming deleted the feature/login branch January 4, 2021 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant