Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separate switches for authorization code for Dropbox refresh token #32

Closed
IAmVigneswaran opened this issue Feb 9, 2024 · 2 comments
Closed
Assignees
Labels
wontfix This will not be worked on
Milestone

Comments

@IAmVigneswaran
Copy link
Contributor

TheAcharya/MarkerData#2 (comment)

@IAmVigneswaran
Copy link
Contributor Author

IAmVigneswaran commented Feb 9, 2024

@arjunprakash027 We would still keep, --dropbox-refresh-token . This is for users users who uses the binary directly.

For Marker Data specifically we add two more switches :

--dropbox-get-authorization-url-only "APPKEY"

It would only create and reset the json file and print the URL in the terminal.

Example -

https://www.dropbox.com/oauth2/authorize?response_type=code&client_id=6zh18qgnw37ifpp&token_access_type=offline&code_challenge=TphrwcwmRtkGawgxFvWQcROFMbjsTeba9BGv0Lgi0nw&code_challenge_method=S256

--dropbox-refresh-token-input-authorization "CODE"

Example -

Refresh Token updated in the json file!
Done!

@IAmVigneswaran IAmVigneswaran changed the title Separate switch for authorization code for Dropbox refresh token Separate switches for authorization code for Dropbox refresh token Feb 9, 2024
@IAmVigneswaran
Copy link
Contributor Author

After experimenting, we have discovered that we can't able to split the process of the getting the URL first and then entering the authorization code separately.

The first step is getting the authorization URL from the Dropbox server and 2nd step is to send the auth code again to the server to get the refresh token. The catch here is, we have to create a SINGLE session to get the url and send the authorization code to get the refresh token. Every session is unique and authorization code received from one session cannot be passed to another session.

When we splitting our refresh-token step into 2 step process, we have to create 2 sessions because we cannot persists the session between 2 runs of the Airlift binary and therefore the code received from the first session of first step cannot be passed to the session created in 2nd step both must be done in the same step.

@IAmVigneswaran IAmVigneswaran added wontfix This will not be worked on and removed enhancement New feature or request labels Feb 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants