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

Feature GitHub auth(WIP) #7

Merged
merged 8 commits into from
Jan 2, 2024
Merged

Feature GitHub auth(WIP) #7

merged 8 commits into from
Jan 2, 2024

Conversation

jingfelix
Copy link
Member

No description provided.

jingfelix and others added 7 commits December 29, 2023 13:39
* feat: init server code and deploy script

* feat: init server code and deploy script.

* add package by pdm

* feat: update

* feat: add session

* feat: add model

* feat: add model

* feat: update config

* feat: update config

* feat: hotfix

* feat: hotfix

* feat: hotfix

* feat: add mysql schema

* feat: add create command

* add command

* add command

* add missing file

* update ca-lark-sdk

* hotfix

* hotfix

* hotfix

* update version

* update

* add celery task

* add celery task

* remove rabbitmq

* update

* add auth

* add auth
@lloydzhou lloydzhou marked this pull request as ready for review January 1, 2024 13:23
from flask import Blueprint, abort, redirect, request, session
from utils.auth import authenticated

from server.utils.github.github import (
Copy link
Collaborator

Choose a reason for hiding this comment

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

这个地方的import 是不是路径有点问题?统一都不加server吧

Copy link
Member Author

Choose a reason for hiding this comment

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

对,应该不加

from server.utils.github.github import oauth_by_code


def register(code: str) -> str | None:
Copy link
Collaborator

Choose a reason for hiding this comment

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

这个是不是移到model文件夹里面?

@jingfelix jingfelix changed the title Feature GitHub auth Feature GitHub auth(WIP) Jan 1, 2024
# 使用 oauth_info 中的 access_token 获取用户信息

new_user = User(
email=user_info.get("email", None),
Copy link
Collaborator

Choose a reason for hiding this comment

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

github是不是可以一个account绑定多个邮箱?
这个github的login是个啥?

@lloydzhou lloydzhou merged commit 13eb33b into main Jan 2, 2024
1 check passed
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.

2 participants