box-python-sdk
box-python-sdk copied to clipboard
Pass a custom state instead of csrf_token during the Oauth2 process.
Hi
First off thanks for this library very helpful.
My question is: Is it possible to pass a custom state string, instead of the auto-generated one (csrf_token), during the Oauth2 process?
Like this:
oauth = OAuth2(
client_id='YOUR_CLIENT_ID',
client_secret='YOUR_CLIENT_SECRET',
store_tokens=your_store_tokens_callback_method
)
auth_url, csrf_token = oauth.get_authorization_url('http://YOUR_REDIRECT_URL', state=<custom_state>)
The doc here says otherwise.
You can subclass the OAuth2
class and override its _get_csrf_token
method to return whatever you want.
This issue has been automatically marked as stale because it has not been updated in the last 30 days. It will be closed if no further activity occurs within the next 7 days. Feel free to reach out or mention Box SDK team member for further help and resources if they are needed.
This issue has been automatically closed due to maximum period of being stale. Thank you for your contribution to Box Python SDK and feel free to open another PR/issue at any time.
This issue has been automatically closed due to maximum period of being stale. Thank you for your contribution to Box Python SDK and feel free to open another PR/issue at any time.