@@ -71,10 +71,10 @@ class AuthorizationView(BaseAuthorizationView, FormView):
7171
7272 def get_initial (self ):
7373 # 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' , []) )
7575 initial_data = {
7676 'redirect_uri' : self .oauth2_data .get ('redirect_uri' , None ),
77- 'scopes ' : ' ' .join (scopes ),
77+ 'scope ' : ' ' .join (scopes ),
7878 'client_id' : self .oauth2_data .get ('client_id' , None ),
7979 'state' : self .oauth2_data .get ('state' , None ),
8080 'response_type' : self .oauth2_data .get ('response_type' , None ),
@@ -90,7 +90,7 @@ def form_valid(self, form):
9090 'state' : form .cleaned_data .get ('state' , None ),
9191 }
9292
93- scopes = form .cleaned_data .get ('scopes ' )
93+ scopes = form .cleaned_data .get ('scope ' )
9494 allow = form .cleaned_data .get ('allow' )
9595 uri , headers , body , status = self .create_authorization_response (
9696 request = self .request , scopes = scopes , credentials = credentials , allow = allow )
0 commit comments