Hi again,
So I'm trying to implement the non-pkce authorization via the Python SDK using DropboxOAuth2Flow with redirects.
View 1 creates the initial auth_flow object.
def dp_auth_start(request):
auth_flow = dropbox.DropboxOAuth2Flow(....use_pkce=False)
return HttpRedirect(auth_flow.start())
View 2 is supposed to take in the servers reply after the user has authorized my app and then again ask for the access_token.
def dp_auth_accepted(request):
auth_flow.finish(request.GET)
... continue with code here
As expected view 2 will yield an error that auth_flow is undefined. Of course, because it has not been passed on from view 1 to view 2 and is not newly defined here.
So my question is a hybrid one:
1) How does the Python SDK account for object transfers in a Django setting?
2) Is there a way that DropboxOAuth2Flow objects will be serializable in the future? This would make things super easy.
3) How would I pass a non-Django object that is not serializable from view 1 to view 2 in a feasible and secure way? I know I could use pickle but try not to (it's working but comes at a price I'm hardly willing to pay).
I really appreciate any help you can provide!
Thanks a lot!