This repository was archived by the owner on Oct 2, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -152,18 +152,21 @@ def auth_token_url(self):
152152 def auth_token_url (self , value ):
153153 self ._auth_token_url = value
154154
155- def get_auth_url (self , redirect_uri ):
155+ def get_auth_url (self , redirect_uri , response_type = None ):
156156 """Build the auth url using the params provided
157157 and the auth_provider
158158
159159 Args:
160160 redirect_uri (str): The URI to redirect the response
161161 to
162+ response_type (str): Response type query param value.
163+ If not provided, defaults to 'code'. Should be either
164+ 'code' or 'token'.
162165 """
163166
164167 params = {
165168 "client_id" : self .client_id ,
166- "response_type" : "code" ,
169+ "response_type" : "code" if response_type is None else response_type ,
167170 "redirect_uri" : redirect_uri
168171 }
169172 if self .scopes is not None :
Original file line number Diff line number Diff line change 3737import webbrowser
3838
3939
40- def get_access_token (auth_url , redirect_uri ):
40+ def get_auth_token (auth_url , redirect_uri ):
4141 """Easy way to get the auth token. Wraps up all the threading
4242 and stuff. Does block main thread.
4343
You can’t perform that action at this time.
0 commit comments