-
Notifications
You must be signed in to change notification settings - Fork 12
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
Conversation
Signed-off-by: jingfelix <[email protected]>
Signed-off-by: jingfelix <[email protected]>
Signed-off-by: jingfelix <[email protected]>
* 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
Signed-off-by: jingfelix <[email protected]>
Signed-off-by: jingfelix <[email protected]>
server/routes/github.py
Outdated
from flask import Blueprint, abort, redirect, request, session | ||
from utils.auth import authenticated | ||
|
||
from server.utils.github.github import ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个地方的import 是不是路径有点问题?统一都不加server吧
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个是不是移到model文件夹里面?
server/utils/user.py
Outdated
# 使用 oauth_info 中的 access_token 获取用户信息 | ||
|
||
new_user = User( | ||
email=user_info.get("email", None), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
github是不是可以一个account绑定多个邮箱?
这个github的login是个啥?
Signed-off-by: jingfelix <[email protected]>
No description provided.