Hi!
I am setting up Dropbox OAuth in an Electron app, and I got the part with generating a redirect URL, opening it in a browser window and letting the user log in working. I can then successfully listen for the redict, but when attempting to get the access token:
const dbx = new Dropbox({ clientId: CLIENT_ID, fetch: fetch });
const tokenResult = await dbx.auth.getAccessTokenFromCode(REDIRECT_URI, code);
I get the following error:
Error: You must use PKCE when generating the authorization URL to not include a client secret
Now, I use the option usePKCE in getAuthenticationUrl, so that should not be an issue. But if I look at where the error comes from, there is a check:
if (!this.codeVerifier) {
throw new Error('You must use PKCE when generating the authorization URL to not include a client secret');
}
so I suppose that something is not set up correctly here.
Can you give some advice? Thanks!