@@ -130,7 +130,7 @@ def __exit__(
130130
131131
132132class _OAuthRedirectHandler (http .server .BaseHTTPRequestHandler ):
133- def log_message (self , _format : str , * _args : Any ) -> None :
133+ def log_message (self , format : str , * _args : Any ) -> None :
134134 pass
135135
136136 def do_GET (self ) -> None :
@@ -177,7 +177,6 @@ def __init__(self, client_id: str, client_secret: str, issuer: Issuer):
177177 self ._client_secret = client_secret
178178 self ._issuer = issuer
179179 self ._state = str (uuid .uuid4 ())
180- self ._nonce = str (uuid .uuid4 ())
181180
182181 self .code_verifier = B64Str (
183182 base64 .urlsafe_b64encode (os .urandom (32 )).rstrip (b"=" ).decode ()
@@ -197,7 +196,7 @@ def auth_endpoint(self, redirect_uri: str) -> str:
197196 # Defensive programming: we don't have a nice way to limit the
198197 # lifetime of the OAuth session here, so we use the internal
199198 # "poison" flag to check if we're attempting to reuse it in a way
200- # that would compromise the flow's security (i.e. nonce reuse).
199+ # that would compromise the flow's security (i.e. state reuse).
201200 if self .__poison :
202201 raise IdentityError ("internal error: OAuth endpoint misuse" )
203202 else :
@@ -216,7 +215,6 @@ def _auth_params(self, redirect_uri: str) -> dict[str, Any]:
216215 "code_challenge" : self .code_challenge ,
217216 "code_challenge_method" : "S256" ,
218217 "state" : self ._state ,
219- "nonce" : self ._nonce ,
220218 }
221219
222220
0 commit comments