File tree 2 files changed +10
-10
lines changed
2 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ def on_authentication_error(
23
23
exception = None ,
24
24
extra_context = None ,
25
25
state_id = None ,
26
- ):
26
+ ) -> None :
27
27
"""
28
28
Called at a time when it is not clear whether or not this is a headless flow.
29
29
"""
Original file line number Diff line number Diff line change @@ -20,6 +20,15 @@ def render_authentication_error(
20
20
extra_context = None ,
21
21
):
22
22
try :
23
+ if extra_context is None :
24
+ extra_context = {}
25
+ get_adapter ().on_authentication_error (
26
+ request ,
27
+ provider ,
28
+ error = error ,
29
+ exception = exception ,
30
+ extra_context = extra_context ,
31
+ )
23
32
if allauth_settings .HEADLESS_ENABLED :
24
33
from allauth .headless .socialaccount import internal
25
34
@@ -31,15 +40,6 @@ def render_authentication_error(
31
40
extra_context = extra_context ,
32
41
)
33
42
34
- if extra_context is None :
35
- extra_context = {}
36
- get_adapter ().on_authentication_error (
37
- request ,
38
- provider ,
39
- error = error ,
40
- exception = exception ,
41
- extra_context = extra_context ,
42
- )
43
43
except ImmediateHttpResponse as e :
44
44
return e .response
45
45
if error == AuthError .CANCELLED :
You can’t perform that action at this time.
0 commit comments