How to obtain response data from URL scheme in an application?

I’m working on a vue project. Let’s say I have a application called myApp, and I have an authorisation page which will show QRCode in PC. If I open this page in myApp, it will call window.location.replace(myApp://codes/xxxxx) and then redirect the page to the auth page in myApp. In this page, I can simply authorise the user by clicking the button.

My question is, when I open the scheme myApp://codes/xxxxx, it will call the authorise function of myApp, and then I clicked the authorise button, myApp will return some data. I want obtain auth code parameter in the data, how could I obtain it? If there is any ambiguity illustration, please let me know.