DeanWay / fastapi-versioning

api versioning for fastapi web applications
MIT License
642 stars 63 forks source link

OAuth2PasswordBearer does not work with versioned api #64

Closed ak4zh closed 2 years ago

ak4zh commented 2 years ago

Describe the bug OAuth2PasswordBearer requires a tokenUrl this does not get api versioned automatically. How should that be handled?

from fastapi.security import OAuth2PasswordBearer

oauth2_scheme = OAuth2PasswordBearer(tokenUrl=f"/auth/login")
jordantshaw commented 2 years ago

Same question. @Ak4zh did you figure out a solution for this?

@DeanWay any input?