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

【auth-ui】Auth组件 #32

Closed
heimanba opened this issue Feb 1, 2023 · 3 comments
Closed

【auth-ui】Auth组件 #32

heimanba opened this issue Feb 1, 2023 · 3 comments

Comments

@heimanba
Copy link
Member

heimanba commented Feb 1, 2023

UI页面

  1. serverless-cd现状
    image

  2. 设计图
    image

  3. 参考1
    https://tailwindui.com/components/application-ui/forms/sign-in-forms

  4. 参考2
    https://identity.netlify.com/

接口设计(初稿)

<Auth title={} 
	value={
       // 传统登录
		credentialProvider={
				credentials: {
					username: {label: "username", type: "username"},
					email: {label: "Email", type: "email"},
	                password: {label: "Password", type: "password"}
				},
				//  登录
				async signIn(credentials, req) {
	                return result;
	            },
				// 注册
				async signUp(credentials, req) {
	                //  校验
	                return result;
	            },
		},
		githubProvider: {
			url: 'https://github.com/login/oauth/authorize?client_id=86059a1b2bb20d3e5fc3&scope=repo,repo:status,delete_repo'
		},
		giteeProvider: {
			url: 'https://github.com/login/oauth/authorize?client_id=86059a1b2bb20d3e5fc3&scope=repo,repo:status,delete_repo'
		}
	}
	onChange=() => {}
>
</Auth>

技术推荐

  1. console-conponent
  2. react
@heimanba heimanba changed the title Auth组件完成 Auth组件 Feb 1, 2023
@heimanba
Copy link
Member Author

heimanba commented Feb 1, 2023

传统登录

登录流程

  1. 填写基本信息
  2. 校验
  • 前端校验
  • 后端校验 => /signin

注册流程

  1. 填写基本信息
  2. 校验
  • 后端校验 => / signup

微信

点击一个URL

@heimanba
Copy link
Member Author

heimanba commented Feb 1, 2023

@heimanba heimanba changed the title Auth组件 【auth-ui】Auth组件 Feb 9, 2023
@heimanba
Copy link
Member Author

heimanba commented Mar 8, 2023

done

@heimanba heimanba closed this as completed Mar 8, 2023
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

No branches or pull requests

1 participant