Comments (1)
This is expected behavior, the auth schemes only have documentation purposes (and allow swagger UI to obtain the token) and do not involve any verification on fastapi side. This happens exclusively in auth.get_user
.
In your case, you can do this to secure the endpoint:
@app.get("/templates",
response_model=Response[List[Template]],
dependencies=[Depends(auth.implicit_scheme), Depends(auth.get_user)])
def list_templates():
data = get_static("templates.json")
return Response(data=data)
See the tests for detailed usage of auth (lines 38-69) https://github.com/dorinclisu/fastapi-auth0/blob/master/tests/test_auth.py
from fastapi-auth0.
Related Issues (20)
- [Q] - Is it possible to get the "Organization" that the user belong to? HOT 6
- Question regarding differences between this project and FastAPI Cloud Auth HOT 4
- Client Credentials Scheme HOT 1
- Support for multiple audience HOT 3
- Token avalid for another api audience gives misleading error message HOT 4
- Authenticating user works from localhost, but not from domain for Single Page Application. HOT 2
- How to authenticate Implicit Grant SPA HOT 4
- How can I get authorization bearer token in frontend? HOT 1
- Websocket Auth Support HOT 2
- Change of license to Apache v2? HOT 4
- Update PyPI package after license change HOT 3
- Creating a M2M-only check. HOT 4
- Feature: Extra enforcement of claims HOT 4
- not able to run HOT 1
- Get a lost of user roles? HOT 1
- Preparing for Rules and Hooks End of Life HOT 2
- How to add an action after the Authorization flow ? HOT 1
- pydantic validation error without scope HOT 6
- Ensure compatibility with Pydantic v2 and FastAPI > 0.100 HOT 1
- [Question] Can I combine different auth methods ? HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fastapi-auth0.