Skip to content

feat: add auth0 related service #95

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

Merged
merged 7 commits into from
May 7, 2024
Merged

feat: add auth0 related service #95

merged 7 commits into from
May 7, 2024

Conversation

alichengyue
Copy link
Contributor

add python login and auth0
add getUserInfo api

Copy link

vercel bot commented Apr 23, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
xuexiao ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 7, 2024 7:18am


export default function Profile() {
const { user } = useUser();

if (!user) {
return (
<Button as={Link} color="primary" href="/api/auth/login" variant="flat">
<Button as={Link} color="primary" href="http://127.0.0.1:8000/api/auth/login" variant="flat">
Copy link
Contributor

Choose a reason for hiding this comment

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

url得替换?

@@ -1,12 +1,13 @@
import { useUser } from '@auth0/nextjs-auth0/client';
// import { useUser } from '@auth0/nextjs-auth0/client';
Copy link
Contributor

Choose a reason for hiding this comment

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

没用删掉?

import useSWR from 'swr';

// 定义 fetcher 函数,这个函数用于发送 HTTP 请求
const fetcher = (url: string) => fetch(url, {
Copy link
Contributor

Choose a reason for hiding this comment

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

请求都放services里,axio

@@ -0,0 +1,20 @@
import useSWR from 'swr';
Copy link
Contributor

Choose a reason for hiding this comment

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

统一 useQuery 吧

requirements.txt Outdated
@@ -0,0 +1,6 @@
flask
Copy link
Contributor

Choose a reason for hiding this comment

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

不需要flask

requirements.txt Outdated
flask
python-dotenv
python-jose
flask-cors
Copy link
Contributor

Choose a reason for hiding this comment

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

flask-cors 也不用

server/main.py Outdated
app.add_middleware(
CORSMiddleware,
allow_origins=["*"], # 明确指定允许的源
allow_credentials=True,
Copy link
Contributor

Choose a reason for hiding this comment

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

@xingwanying xingwanying changed the title Feat/chengyue bot feat: add auth0 related service May 7, 2024
@xingwanying xingwanying merged commit 154ca81 into main May 7, 2024
3 checks 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