@@ -71,10 +71,10 @@ class AuthorizationView(BaseAuthorizationView, FormView):
71
71
72
72
def get_initial (self ):
73
73
# TODO: move this scopes conversion from and to string into a utils function
74
- scopes = self .oauth2_data .get ('scopes' , [])
74
+ scopes = self .oauth2_data .get ('scope' , self . oauth2_data . get ( ' scopes' , []) )
75
75
initial_data = {
76
76
'redirect_uri' : self .oauth2_data .get ('redirect_uri' , None ),
77
- 'scopes ' : ' ' .join (scopes ),
77
+ 'scope ' : ' ' .join (scopes ),
78
78
'client_id' : self .oauth2_data .get ('client_id' , None ),
79
79
'state' : self .oauth2_data .get ('state' , None ),
80
80
'response_type' : self .oauth2_data .get ('response_type' , None ),
@@ -90,7 +90,7 @@ def form_valid(self, form):
90
90
'state' : form .cleaned_data .get ('state' , None ),
91
91
}
92
92
93
- scopes = form .cleaned_data .get ('scopes ' )
93
+ scopes = form .cleaned_data .get ('scope ' )
94
94
allow = form .cleaned_data .get ('allow' )
95
95
uri , headers , body , status = self .create_authorization_response (
96
96
request = self .request , scopes = scopes , credentials = credentials , allow = allow )
0 commit comments