Commit 5fc9041d by archer

perf: git

parent 3cf38930
...@@ -41,8 +41,8 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse< ...@@ -41,8 +41,8 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse<
Authorization: `Bearer ${access_token}` Authorization: `Bearer ${access_token}`
} }
}); });
const { login, email, avatar_url } = data; const { login, avatar_url } = data;
const username = email || login; const username = `git-${login}`;
try { try {
jsonRes(res, { jsonRes(res, {
......
...@@ -137,6 +137,7 @@ const LoginForm = ({ setPageType, loginSuccess }: Props) => { ...@@ -137,6 +137,7 @@ const LoginForm = ({ setPageType, loginSuccess }: Props) => {
登录 登录
</Button> </Button>
{feConfigs?.show_register && ( {feConfigs?.show_register && (
<>
<Flex mt={10} justifyContent={'center'} alignItems={'center'}> <Flex mt={10} justifyContent={'center'} alignItems={'center'}>
<MyIcon <MyIcon
name="gitFill" name="gitFill"
...@@ -146,6 +147,11 @@ const LoginForm = ({ setPageType, loginSuccess }: Props) => { ...@@ -146,6 +147,11 @@ const LoginForm = ({ setPageType, loginSuccess }: Props) => {
onClick={onclickGit} onClick={onclickGit}
/> />
</Flex> </Flex>
<Box mt={3} textAlign={'center'} fontSize={'sm'} color={'myGray.600'}>
由于 Git 登录设计缺陷,我们重新设计了 Git 登录,已使用 Git
注册的账号将会丢失关联,如果你希望重新绑定原来的账号,可以点击右下角的【联系方式】,我们会手动为你重新绑定。不需要重新关联的,将会注册新的账号。
</Box>
</>
)} )}
</form> </form>
</> </>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment