Thanks, Ray, for the quick response!
I was more looking to see if anyone had advice on a better solution to the issue. I'm not sure whether my approach is a misuse of the callbackAuthorize endpoint.
Writing a comprehensive functional test for this seems challenging, due to Puppeteer's limitations around custom URL schemes. Instead, I've written a negative test to check that the custom URL scheme isn't treated as a relative path.
In any case, I've opened a couple of PRs with this work:
#8402 for the master branch, and
#8403 for the 7.3.x branch. Happy to discuss these changes either here or on those PRs!
Thanks,
Jed Liu
Software Engineer, eBird
Cornell Lab of Ornithology