-
Notifications
You must be signed in to change notification settings - Fork 21
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
feat: support local auth #593
Conversation
RaoHai
commented
Dec 17, 2024
- 支持通过环境变量跳过 auth0 登录。本地模拟登录
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
WalkthroughThis pull request introduces support for local authentication by allowing the system to bypass Auth0 login through environment variables. It implements a local login simulation, providing an alternative authentication method when Auth0 is disabled. Changes
|
} | ||
async with httpx.AsyncClient() as client: | ||
response = await client.post(url, data=data, headers=headers) | ||
return response.json()['access_token'] |
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.
Ensure to handle potential exceptions when accessing response.json()['access_token']
to avoid runtime errors in case of unexpected response formats or errors.
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.
LG