Skip to content

Commit 4b3e6a6

Browse files
committed
Add a default value for auth scope
1 parent 9bbec26 commit 4b3e6a6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/fastapi_oauth2/middleware.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ async def authenticate(self, request: Request) -> Optional[Tuple["Auth", "User"]
9595
return Auth(), User()
9696

9797
user = Auth.jwt_decode(param)
98-
return Auth(user.pop("scope")), User(user)
98+
return Auth(user.pop("scope", [])), User(user)
9999

100100

101101
class OAuth2Middleware:

0 commit comments

Comments
 (0)