Fun JS bug of the day introduced by a linting change, that lost me a good amount of time trying to work out what was going wrong:
- const tokenSet = await client.oauthCallback(redirect, params, { code_verifier });
+ const tokenSet = await client.oauthCallback(redirect, params, { codeVerifier })
Silently changed the meaning of the code here, and needed to be fixed with:
- const tokenSet = await client.oauthCallback(redirect, params, { codeVerifier }).catch((err) => {
+ const tokenSet = await client.oauthCallback(redirect, params, { code_verifier: codeVerifier }).catch((err) => {
Funnily enough, I've had this lead to dangerous logging in the past, but didn't spot this at first. That'll teach me!
This post was filed under notes.
Interactions with this post
Interactions with this post
Below you can find the interactions that this page has had using WebMention.
Have you written a response to this post? Let me know the URL:
Do you not have a website set up with WebMention capabilities? You can use Comment Parade.