Skip to content

How to use this with a simple project #317

Answered by frankie567
Nneji123 asked this question in Q&A
Discussion options

You must be logged in to vote

You can refer to the following example: https://docs.fief.dev/integrate/python/fastapi/#api-example

@app.get("/user")
async def get_user(
    access_token_info: FiefAccessTokenInfo = Depends(auth.authenticated()),  
):
    return access_token_info

FiefAccessTokenInfo is a dictionary containing the id key; which is the ID of the user in Fief. You can use this ID to reference the user in your app and data.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@Nneji123
Comment options

@frankie567
Comment options

Answer selected by Nneji123
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants